vvvmax / unitegallery

Unite Gallery - Responsive jQuery Image and Video Gallery Plugin. Aim to be the best gallery on the web on it's kind. See demo here:
http://unitegallery.net
MIT License
531 stars 158 forks source link

Tiles Grid: Cannot read property 'replace' of undefined at UGFunctions.stripTags #147

Open emadd opened 7 years ago

emadd commented 7 years ago

The default theme works just fine for me, but Tile Grid does not complete initialization of the gallery.

Uncaught TypeError: Cannot read property 'replace' of undefined
    at UGFunctions.stripTags (unitegallery.js:2316)
    at Object.setHtmlThumb [as funcSetCustomThumbHtml] (unitegallery.js:10798)
    at appendHtmlThumbFromItem (unitegallery.js:2555)
    at UGThumbsGeneral.setHtmlThumbs (unitegallery.js:2583)
    at UGTileDesign.setHtml (unitegallery.js:11466)
    at setHtml (unitegallery.js:7266)
    at UGThumbsGrid.setHtml (unitegallery.js:8685)
    at setHtml (ug-theme-tilesgrid.js:143)
    at runTheme (ug-theme-tilesgrid.js:234)
    at UGTheme_tilesgrid.run (ug-theme-tilesgrid.js:438)

DOM is straightforward Handlebars output...

<div id="holesGallery">
    {{#each galleryImages}}
        <img src="{{this.thumb.url}}" data-image="{{this.large.url}}" />
    {{/each}}
</div>

JS...

$('#holesGallery').unitegallery({
   gallery_theme: "tilesgrid"
});
dbqt commented 7 years ago

I have the same issue, any workaround?

stpa81 commented 6 years ago

Had the same problem and solved it by adding an "alt" attribute to the images.

mihail-minkov commented 6 years ago

@stpa81 your solution did the trick for me, it's strange it requires the alt attribute for that specific mode.

lix-dev commented 6 years ago

same issue here. solved with adding the "alt" attribute too...

dush88gs commented 6 years ago

I can confirm that after adding "alt" attribute, it's working. thank you @stpa81

tamasviktor commented 6 years ago

Thank you @stpa81! Your solution worked for me too.

pedrofurtado commented 6 years ago

@vvvmax Is this a bug? More than a year and this issue still happens, in version 1.7.40