Textpattern CMS support forum

You are not logged in. Register | Login | Help

#331 2016-10-19 09:16:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,622
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

@michaelkpate: I don’t know if this is the plugin or not. Could you please try using the search box on the Image list panel, select some fields and perform any search, then try editing an image again. I think that might cure it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#332 2016-10-19 14:14:44

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,169
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

I did a bit of experimenting. From the Images Tab

If I click on the ID#, I bring up the individual image screen without the error messages.

If I click on the Name, I bring up the individual image screen without the error messages.

If I click on the Thumbnail, I bring up the individual image screen with the error messages.

I disabled the plugin and went back to Images. I noticed that the Thumbnail no longer appears and therefore can not be clicked on. I enabled the plugin and saw the same thing.

I uploaded a new image and the same behavior occurred.

It doesn’t seem like this has a major impact but it does seem to be plugin-related.

Offline

#333 2016-10-19 14:20:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,622
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

michaelkpate wrote #302318:

If I click on the Thumbnail, I bring up the individual image screen with the error messages.

Aha! Thank you. Confirmed. I’ll get that fixed. In the meantime… uhhh avoid clicking the thumbnail to edit :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#334 2016-10-20 13:48:50

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,169
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Bloke wrote #302319:

Aha! Thank you. Confirmed. I’ll get that fixed. In the meantime… uhhh avoid clicking the thumbnail to edit :-)

Another Update: I changed the default Thumbnail Profile to a different size. The error disappeared. I tried changing it to other sizes and it still doesn’t return.

Offline

#335 2016-10-27 02:21:59

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,169
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Okay, so I am trying to get the public side to work now.

This is the error message I am getting:

Tag error: <txp:smd_thumbnail type="hero" class="single-post-img" /> ->  Textpattern Notice: Unknown image while parsing form default on page articles

I know the image is set correctly because this works.

<txp:article_image class="single-post-img" />

No matter which profile I use I get the same error.

Edit: I solved it by following this advice.

<txp:images>
  <txp:smd_thumbnail type="hero" class="single-post-img" />
</txp:images>

Offline

#336 2017-01-30 06:12:40

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,643
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Not sure if this is me doing something wrong, or if the plugin has some slight issue TXP 4.7 / debug
That notice is repeated twice (for each <txp:smd_thumbail/> call in the srcset attribute

Tag error: <txp:smd_thumbnail type='hero-S' form='hero2-img-srcset' /> ->  Notice: Undefined variable: alt while parsing form pw_hero-images_2 on page archive
textpattern/lib/txplib_misc.php(1802) : eval()'d code:1681 smd_thumb_img()
smd_thumbnail()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:558 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:502 processTags()
textpattern/lib/txplib_misc.php:4293 parse()
textpattern/publish/taghandlers.php:3541 parse_form()
images()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:558 Textpattern\Tag\Registry->process()

Inside the body of an article, I insert <txp:images id="xx" form="p-hero-image" />.

The form (p-hero-image) – it is basically the code posted by Maniqui:

xml
<figure itemprop="associatedMedia image" itemscope itemtype="http://schema.org/ImageObject">
    <meta itemprop="url" content="<txp:image_url link='0' />">
    <meta itemprop="width" content="<txp:image_info type='w' />">
    <meta itemprop="height" content="<txp:image_info type='h' />">
  <img alt="<txp:image_info type='alt' />" src="<txp:smd_thumbnail type='hero-M' display='url' />" srcset="<txp:smd_thumbnail type='hero-S' form='hero2-img-srcset' />, <txp:smd_thumbnail type='hero-M' form='hero2-img-srcset' />, <txp:image_url link='0' /> <txp:image_info type='w' />w" sizes="(min-width: 1524px) 1500px,(min-width: 768px) 800px,calc(100vw - 3em)">
  <figcaption itemprop="caption">
    <txp:image_info type="caption" />
  </figcaption>
</figure>

The form called inside the <txp:smd_thumbail/>

xml
<txp:smd_thumbnail_info item="url" /> <txp:smd_thumbnail_info item="w" />w

Everything works right (I get the desired output), but for that Tag error / notice. My delicate sense of aesthetics is violently thrown off balance by this big error blocks at the top of the page :-(

EDIT

If I change my form slightly, modifying to calls in the scrset attribute,

xml
srcset="<txp:smd_thumbnail type='hero-S'><txp:smd_thumbnail_info item="url" /> <txp:smd_thumbnail_info item="w" />w</txp:smd_thumbnail>, <txp:smd_thumbnail type='hero-M'><txp:smd_thumbnail_info item="url" /> <txp:smd_thumbnail_info item="w" />w</txp:smd_thumbnail>

I still get the error / notice:

Tag error: <txp:smd_thumbnail type='hero-S'> ->  Notice: Undefined variable: alt while parsing form…

Last edited by phiw13 (2017-01-30 07:22:45)

Offline

#337 2017-01-31 05:50:28

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,643
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

phiw13 wrote #303721:

Not sure if this is me doing something wrong, or if the plugin has some slight issue TXP 4.7 / debug

FWIW, here is an easier way to reproduce the issue. With a default TXP install (default front-end theme), go to the default form, and look for the <txp:if_article_image> block. Replace the <txp:images form="images" /> with the code below (adjust the type='hero-M' with the name of your smd_thumbnails profile):

xml
<txp:images id='<txp:custom_field name="article_image" />'>
  <img itemprop="url" src="<txp:smd_thumbnail type='hero-M'><txp:smd_thumbnail_info item='url' /></txp:smd_thumbnail>" alt="<txp:image_info type='alt' />">
</txp:images>

Then, upload your image, create the thumbnails; create an article with an article image, view the article.

I get the following:

Tag error: <txp:smd_thumbnail type='hero-M'> ->  Notice: Undefined variable: alt while parsing form default on page archive

HTH

Offline

#338 2017-02-16 16:19:49

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,169
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

I am stuck on this one.

I have an article template with the following code:

<txp:images><a href="<txp:permlink />" title="<txp:title />"><img src="<txp:smd_thumbnail type="large" display="url" />" alt="<txp:image_info type="alt" />" /></a></txp:images>

I was expecting that <txp:image_info type=“alt” /> would return the alt for the image. Instead, I am getting this:

alt="<img src="http://thirdsuperpower.com/images/popular-posts/11.jpg" width="240" height="190" alt="" class="popular-posts" />"

I realize I should probably be using <txp:smd_thumbnail_info /> but I got stuck on that one as well.

Offline

#339 2017-02-16 18:06:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,213
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

hi Michael,

I of course do not know exactly how you are calling the image. Did you try?

<txp:images id="##"><a href="<txp:permlink />" title="<txp:title />"><img src="<txp:smd_thumbnail type="large" display="url" />" alt="<txp:image_info type="alt" />" /></a></txp:images>

Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#340 2017-06-30 16:54:14

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

If smd_thumbnail is active, on 4.7 dev, the option image list button (to hide/show columns) don’t work (is not active, don’t open the drop down).

Offline

Board footer

Powered by FluxBB