• Resolved Sageth

    (@sageth)


    Hello.

    Since the last plugin update, I’ve been seeing the following in my error logs. There doesn’t seem to be any impact, other than the warnings. It seems like strings.class.php doesn’t exist.

    I haven’t tried reinstalling the plugin or extension manager yet because I don’t know if I will need to redo all of my settings/configuration and I didn’t notice a way to export. I also don’t see that file in github.

    PHP Warning:  require(/wp-content/plugins/autodescription/inc/classes/data/filter/strings.class.php): Failed to open stream: No such file or directory in /wp-content/plugins/autodescription/bootstrap/load.php on line 207; PHP message: PHP Fatal error:  Uncaught Error: Failed opening required '/wp-content/plugins/autodescription/inc/classes/data/filter/strings.class.php' (include_path='.:/usr/share/pear:/usr/share/php') in /wp-content/plugins/autodescription/bootstrap/load.php:20

    Stack trace:
    #0 /wp-content/plugins/autodescription/inc/classes/data/filter/sanitize.class.php(453): The_SEO_Framework\_autoload_classes()

    #1 /wp-content/plugins/autodescription/inc/classes/meta/image.class.php(640): The_SEO_Framework\Data\Filter\Sanitize::image_details()

    #2 /wp-content/plugins/autodescription/inc/classes/meta/image.class.php(328): The_SEO_Framework\Meta\Image::generate_image_from_callbacks()

    #3 /wp-content/plugins/autodescription/inc/classes/meta/image.class.php(235): The_SEO_Framework\Meta\Image::generate_generated_image_details()

    #4 /wp-content/plugins/autodescription/inc/classes/meta/image.class" while reading response header from upstream, client: 216.xxx.xxx.xxx, server: myserver, request: "GET /news-articles/my-url HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fcgi.pid:", host: "example.com"

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    I imagine that’d crash on PHP 8.

    This issue happens when an image with an alt tag is used for social sharing, either manually assigned as a social image or featured image.

    I’ve just committed a fix for this on GitHub and plan to have a release ready ASAP.

    Thank you for reporting!

    Plugin Author Sybre Waaijer

    (@cybr)

    More info: It crashes both PHP 8 and PHP 7.4. It prevents editing and viewing the page. I’m not sure why you haven’t experienced fatal errors but only warnings.

    Crashing warrants an immediate patch — however, it’s past midnight for me, so I’ll postpone it to tomorrow.

    In any case, this only happens when the page has a social image with an alt tag of over 420 characters (at which point we want to start adjusting the string). Such long alt tags are rare, so I expect this delay won’t cause too much trouble.

    Thread Starter Sageth

    (@sageth)

    Thank you for the info and no problem on the fix. If I get some time, I will try to look into a patch as well, though I won’t be able to look for at least 24 hours.

    Also, I tested a few URLs (PHP8) and I am definitely able to view the images with no problem on the front-end. I have some aggressive caching in place, because my site is so image heavy, so disabled that and also had no problem. I was also able to see and modify the image (metadata) in the library and on the page itself, but I did not try cropping or editing the image itself. As far as I can tell, it is not impacting the page.

    I do see some 404/blank images in cases where the image was scaled and -scaled was appended to the filename, but I don’t think that’s related at first glance. All cases are legitimate 404’s due to other work I was doing.

    I’ll keep digging.

    Thread Starter Sageth

    (@sageth)

    Quick update. I can confirm that the error occurs with featured images. Every erroring featured image I’ve checked has an alt tag of 422-460 characters.

    While that isn’t something I’m willing to change right now on historical content, I will take this into consideration for the future as I wasn’t really aware that my alt tags were so long.

    Thread Starter Sageth

    (@sageth)

    Minor update. I was able to reproduce the error. The public page returns a critical error page. I can get to the page in admin, but I can’t make any modifications, as you initially suspected. I’m also starting to get recovery mode emails.

    In my set-up, my captions are often the same as the image description and alternative text.

    On one page in the admin, the image showed a few words of alt text until a (presumably unescaped/encoded) quotation mark.

    On another page, there doesn’t appear to be any punctuation or special character. On that page, there is no alt text or caption.

    I’m not home yet to look in more detail in the database — going mostly by logs at this point.

    Plugin Author Sybre Waaijer

    (@cybr)

    Thank you for the additional info!

    I was initially confused as you got a Warning instead of an Error. But, in the log you shared, it also says PHP message: PHP Fatal error: Uncaught Error: — so the formatting of that log threw me off.

    It was a logical error — a non-existing class name was used. More precisely, I overlooked importing the namespace of the string formatter in that file, and none of my tests included an alt-tag over 420 characters, so I missed that error.

    That class is only called when there are more than 420 characters in the alt-tag of an image for Open Graph or Twitter Card. This alt-tag is also processed in the admin area where the social image uploader is present — this adds needless processing, but I haven’t quite figured out a good way around that.

    Nevertheless, if you still encounter issues after updating to TSF v5.0.1, please share the errors with me. I’ve scheduled TSF v5.0.1 for Monday.

    Thread Starter Sageth

    (@sageth)

    Confirmed that this is resolved. I have been running for ~16 hours and no errors. Thank you, and sorry I didn’t have a chance to look into this myself more.

    Plugin Author Sybre Waaijer

    (@cybr)

    I’m happy it works well.

    You’ve been immensely helpful by providing the error log; it helped me instantly find the source of the issue.

    Have a lovely day!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘strings.class.php’ is closed to new replies.