• Hello! First I must say this plugin is fantastic. I love how it doesn’t bloat the code when it’s not in use.

    However, I’m experiencing some problems with it. Suddenly this error happened:
    Fatal error: Cannot redeclare return_30() (previously declared in (…)\wordpress\wp-content\plugins\submission-manager-by-submittable\submittable.php:318) in (…)\wordpress\wp-content\plugins\submission-manager-by-submittable\submittable.php on line 318

    The Cause: After scratching my head trying to figure out the cause of the sudden errors I’ve narrowed it down to how the function return_30 gets declared inside submittable_get_content. Right after that you have an “add_shortcode(‘submittable’, ‘submittable_get_content’);“. If you happen to have a “apply_filters( ‘the_content’, $truncate );” later in your code—which I had in a custom truncating function for a special post type—it’ll attempt to apply the shortcodes. You can guess what happens when it attempts to truncate two or more posts in the same page.

    The Solution: A quick fix would be to add a if(!function_exists(‘return_30’)) in the submittable_get_content. In my case I also removed the submittable shortcode before I execute my custom truncate, for I don’t need it in excerpts.

    Also, the submittable is generating a Notice: Undefined index: show_main_description when you don’t tick the “Show Main Description?” option. It’s unrelated to the above problem and it’s a silent notice that won’t appear unless you set the php to show all errors, but, well, no one likes to leave loose ends, right? (:

    https://www.ads-software.com/plugins/submission-manager-by-submittable/

  • The topic ‘"Fatal error: Cannot redeclare return_30()"’ is closed to new replies.