ShortCodes UI
[resolved] error after editing & re-saving page with the shortcode (2 posts)

  1. SiteSubscribe
    Posted 3 years ago #

    Hi. I'm having some issue with PHP.

    Fatal error: Call to a member function list_attributes() on a non-object in /home/wpmash/public_html/incadventures/wp-content/plugins/shortcodes-ui/shortcode-maker.php(1197) : eval()'d code on line 4

    I only get the error when I save or resave a post that has the associated shortcode. And what's really odd is I only get the error sometimes when saving, not every time.


    I'm adding the following php into php section as advanced mode:

    global $woocommerce, $post, $product;
    echo "<div class='fast-facts'>";
    echo "<h2>Fast Facts</h2>";
    echo "</div>";

    This code for displaying WooCommerce custom attributes within a page seems to work sometimes, but as I said, throws error after editing and re-saving the page with the shortcode in it.

    I've tried changing the setting: 'my code uses PHP echo' to 'return', but it seems to work the same either way (I would think 'echo' would apply here).

    I get the php error on a white screen. If I reopen the page editor on another browser tab the page changes actually saved properly, and the page displays the WooCommerce attributes on the page as expected.


  2. Bainternet
    Plugin Author

    Posted 3 years ago #

    This clearly states that you have an error with your code on this line


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • ShortCodes UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.