• Resolved Raysn

    (@schulhilfe)


    Hello there,

    when I leave the shortcode [asa customtemplate][/asa] empty, I always get a critical error that crushes my site / the URL containing the shortcode. This is happening in the frontend as well as in the post edit view in the backend).

    This is, what the internal WordPress error report says:

    #WordPress-Version 5.3.2
    Aktuelles Theme: GeneratePress Child (Version 0.1)
    Aktuelles Plugin: AmazonSimpleAdmin (ASA1) (Version 1.4.6)
    PHP-Version 7.3.13###
    
    #
    
    Fehler-Details
    ==============
    Ein Fehler vom Typ E_ERROR wurde in der Zeile 209 der Datei /wp-content/plugins/amazonsimpleadmin/lib/AsaZend/Cache.php verursacht. Fehlermeldung: Uncaught AsaZend_Cache_Exception: Invalid id or tag '' : must use only [a-zA-Z0-9_] in /wp-content/plugins/amazonsimpleadmin/lib/AsaZend/Cache.php:209
    Stack trace:
    #0 /wp-content/plugins/amazonsimpleadmin/lib/AsaZend/Cache/Core.php(673): AsaZend_Cache::throwException('Invalid id or t...')
    #1 /wp-content/plugins/amazonsimpleadmin/lib/AsaZend/Cache/Core.php(326): AsaZend_Cache_Core::_validateIdOrTag('')
    #2 /wp-content/plugins/amazonsimpleadmin/lib/Asa/Prefetcher.php(108): AsaZend_Cache_Core->test('')
    #3 /wp-content/plugins/amazonsimpleadmin/lib/Asa/Prefetcher.php(94): Asa_Prefetcher->addCollectedAsin('')
    #4 [internal function]: Asa_Prefetcher->collectAsinsFromShortcodeAsa(Array)
    #5 /wp-content/plugins/amazonsimpleadmin/lib/Asa/Prefetcher.php(71): preg_####

    I’d be very thankful if you could tell me, how to fix this.

    Greets
    Raysn

    • This topic was modified 4 years, 8 months ago by Raysn.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Timo

    (@worschtebrot)

    Thanks for your feedback. The fastest solution is not to leave the shortcode empty. For the next update I will try to catch this error better in case of an empty shortcode, so that no exception is produced.

    Thread Starter Raysn

    (@schulhilfe)

    Thanks for your quick response, Timo!

    The fastest solution is not to leave the shortcode empty.

    I also thought about that. But since I want to work with post templates in which I only have to enter the correct ASINs, it would of course be nicer if the error did not even occur. Indeed, I would be very happy if the bug was fixed in the next update.

    Anyways – ASA is a great plugin! Keep up your work 🙂

    Greets
    Raysn

    Plugin Author Timo

    (@worschtebrot)

    Sure, I can understand that. I have created a todo ticket for this case and will optimize the error handling of empty shortcodes with the next update. 🙂

    Plugin Author Timo

    (@worschtebrot)

    This has been fixed in version 1.4.7, which has been released recently. 🙂

    Thread Starter Raysn

    (@schulhilfe)

    Hey Timo,

    just wanted to thank you for this quick fix! Now everything works fine for me 🙂

    Greets
    Raysn

    Plugin Author Timo

    (@worschtebrot)

    Sehr gerne / it’s my pleasure. 😉

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Critical error when leaving shortcode ASIN empty’ is closed to new replies.