Topic: mdb-5 ecommerce gallery
Johann ESPANET
pro premium priority asked 3 months ago
hi,
I try to use mdb-5 ecommerce gallery, it work great when i just copy the code in my project but when i put a picture to me it doesn't work the class active switch good to the thumbnails but not in big one.Can you help me? thx
sorry for my english^^
Johann ESPANET
pro premium priority answered 3 months ago
<div class="ecommerce-gallery" data-zoom-effect="true">
<div class="row">
<div class="col-12 mb-1">
<div class="lightbox">
<img src="https://mdbcdn.b-cdn.net/img/img1.jpg" alt="Gallery image 1" class="ecommerce-gallery-main-img active w-100" />
</div>
</div>
<div class="col-3">
<img src="https://mdbcdn.b-cdn.net/img/img1.jpg" data-mdb-img="https://mdbcdn.b-cdn.net/img/img1.jpg" alt="Gallery image 1" class="active w-100" />
</div>
<div class="col-3">
<img src="https://mdbcdn.b-cdn.net/img/img2.jpg" data-mdb-img="https://mdbcdn.b-cdn.net/img/img2.jpg" alt="Gallery image 2" class="w-100" />
</div>
<div class="col-3">
<img src="https://mdbcdn.b-cdn.net/img/img3.jpg" data-mdb-img="https://mdbcdn.b-cdn.net/img/img3.jpg" alt="Gallery image 3" class="w-100" />
</div>
<div class="col-3">
<img src="https://mdbcdn.b-cdn.net/img/img4.jpg" data-mdb-img="https://mdbcdn.b-cdn.net/img/img4.jpg" alt="Gallery image 4" class="w-100" />
</div>
</div>
</div>
Grzegorz Bujański staff commented 3 months ago
The code looks fine. Do you have any errors in your console? I understand that this active class always stays on the same element on the main images?
Johann ESPANET pro premium priority commented 2 months ago
No errors in my console
Johann ESPANET pro premium priority commented 2 months ago
No errors in my console. On load the first picture and his thumbnail are good but if i click on other thumbnail, the thumbnail take active class but not the picture and after nothing works
Grzegorz Bujański staff commented 2 months ago
Please send the project with this error to my e-mail: g.bujanski@mdbootstrap.com. I'll check what's going on.
Johann ESPANET
pro premium priority answered 2 months ago
Grzegorz Bujański
staff answered 2 months ago
Unfortunately we have no experience with symfony and I was unable to get your project started. But I was able to locate the code from the e-commerce gallery. The first element you add must have the active class. From what I understand, these elements are loaded and none of them has this class.
Try adding code from our documentation without using a for loop and check if everything works fine.
Johann ESPANET pro premium priority commented 2 months ago
I already try and it doesn't work. I try to use a simple html page and just copy the code in documentation and use my picture and doesn't work.
Grzegorz Bujański staff commented 2 months ago
I tried to run your project again. Unfortunately, it looks like migrations are not working. I get an error. Fixing one error (eg creating tables manually) results in a new one. I need access to a project in which I can reproduce this issue. Are you able to prepare such a minimal project in which this error will occur?
Johann ESPANET pro premium priority commented 2 months ago
i send you an other email with a simple project with no for loop or nothing and it doesn't work too.
Grzegorz Bujański
staff answered 2 months ago
I'm sorry it took so long, but I wanted to check everything carefully.
Looks like local images are the problem. When all pictures are loaded from the link everything works fine. Only adding local images causes an error. We will fix it as soon as possible.
Johann ESPANET pro premium priority commented 2 months ago
How can i know if the bug is fixed ?thanks for your feedbacks.
Grzegorz Bujański staff commented 2 months ago
You can follow our changelog: https://mdbootstrap.com/docs/standard/getting-started/changelog/. We list there all changes and fixes in each new version of MDB.
itsme
pro priority answered 1 months ago
Vasileios Valasidis
pro premium priority answered 4 weeks ago
I have the same Problem... Try to put ALL url https://domain/image/.jpeg and not insert only the /image/.jpeg and it Works.
Please to MDB Team please fix it to understand /image/name.jpeg .
Answered
- User: Pro
- Premium support: No
- Technology: MDB 5
- MDB Version: 3.0.0
- Device: pc
- Browser: all
- OS: windows
- Provided sample code: No
- Provided link: No
Grzegorz Bujański staff commented 3 months ago
Unfortunately, I am unable to reproduce this error. Send the code that doesn't work for you, I'll check what's going on.