Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] empty li tag in txp:images
I recently deleted an image from a category, and since then, I sometimes get an empty tag (skipping a slide) in a couple of slideshows that the image was used in.
The code I am using:
<figure itemscope itemtype="http://schema.org/ImageObject" class="grid_18 slides" aria-hidden="true">
<txp:images category="promote" limit="8" sort="rand()" wraptag="ul" break="li" class="rslides">
<txp:permlink id='<txp:image_info type="name" />'><txp:image loading="lazy" /></txp:permlink>
</txp:images>
</figure>
The result
<figure itemscope="" itemtype="http://schema.org/ImageObject" class="grid_18 slides" aria-hidden="true">
<ul class="rslides rslides1">
...
<li id="rslides1_s6" style="float: none; position: absolute; opacity: 0; z-index: 1; transition: opacity 500ms ease-in-out 0s;" class="">
<a rel="bookmark" href="https://www.neme.org/projects/ideodrome-2008"><img src="https://www.neme.org/images/8.jpg" alt="ideodrome" loading="lazy" width="710" height="300"></a>
</li>
<li id="rslides1_s7" style="float: none; position: absolute; opacity: 0; z-index: 1; transition: opacity 500ms ease-in-out 0s;" class="">
</li>
</ul>
</figure>
The glitch appears on www.neme.org, www.neme.org/texts/ and www.neme.org/about/ but not on every refresh of the page.
As far as I can see the txp tags are correct so I am wondering if there is something wrong with my db which actually also looks OK.
ps. I do not remember the id of the image I deleted.
>Edit: Updated the image category name. See next post.
Last edited by colak (2021-07-18 05:35:24)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] empty li tag in txp:images
I tried to fix this by creating another category, moved the 18 images of the random
category to it, but the error remains.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] empty li tag in txp:images
Caught the bug which had nothing to do with what I mentioned above.
One of the images that I have uploaded recently, still had the image name, 1128.jpg, in the field that I am using for the article id.
I’m so looking forward to unlimited cfs!!!
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline