• Resolved Bravo315

    (@bravo315)


    Firstly, thanks to the devs for this plugin. It’s a brilliant tool to show your latest news post on the homepage. We updated our server to PHP7 recently, and the plugin’s shortcode actually stops the rest of the page loading. Running a debugger, we get the following 2 fatal errors.

    Notice: Undefined index: post__not_in in /home/DIR/public_html/wp-content/plugins/advanced-post-list/includes/class/APLQuery.php on line 437

    Fatal error: Call to undefined function mb_internal_encoding() in /home/DIR/public_html/wp-content/plugins/advanced-post-list/includes/class/apl-shortcodes.php on line 833

    Sure enough, there were no instances of APL in either documents, but 100% if it’s designed like that and the Call() is actually the problem.

    Has anyone else had problems with later WordPress installs and this plugin?

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author EkoJR

    (@ekojr)

    This may be an issue i’ve come across, but wasn’t sure what was producing it. I’ve been running most of my debugs in php7, but unsure why it could conflict.

    I’ll need more time to look into this. However, how do you have the filter (does it use pages)?

    Michael

    (@michaelhpdx)

    I have the same issue, on a page where I use APL it’s throwing a PHP Error (Notice) of:

    
    Undefined index: post__not_in
    wp-content/plugins/advanced-post-list/includes/class/APLQuery.php:437
    
    Call Stack:
    APLQuery->set_query_base_val()
     wp-content/plugins/advanced-post-list/includes/class/APLQuery.php:299
    APLQuery->set_query()
     wp-content/plugins/advanced-post-list/includes/class/APLQuery.php:87
    APLQuery->__construct()
     wp-content/plugins/advanced-post-list/includes/class/APLCore.php:2028
    APLCore->APL_run()
     wp-content/plugins/advanced-post-list/includes/class/APLCore.php:1941
    APLCore->APL_display()
     wp-content/plugins/advanced-post-list/includes/class/APLCore.php:1897
    APLCore->APL_handler_shortcode()
     Unknown location
    do_shortcode_tag()
     Unknown location
    preg_replace_callback()
     wp-includes/shortcodes.php:223
    do_shortcode()
     Unknown location
    apply_filters('the_content')
     wp-includes/post-template.php:240
    the_content()
     wp-content/themes/whitelight/template-fullwidth.php:37
    

    I’m using APL 0.3.2, WP 4.7.2.
    Thanks for all the great work on this excellent plugin.

    Michael

    • This reply was modified 8 years ago by Michael. Reason: Added plugin and WP version info
    ryharv

    (@ryharv)

    I have this same issue. My webhost (dreamhost) just updated PHP to whatever the current version is. Now on the page where I use APL, I get this at the top:

    Warning: Missing argument 1 for APL_InternalShortcodes::final_end(), called in /home/ryharv/sellwoodconsulting.com/wp-content/plugins/advanced-post-list/includes/class/APLCore.php on line 2062 and defined in /home/ryharv/sellwoodconsulting.com/wp-content/plugins/advanced-post-list/includes/class/apl-shortcodes.php on line 1521

    Warning: Missing argument 1 for APL_InternalShortcodes::final_end(), called in /home/ryharv/sellwoodconsulting.com/wp-content/plugins/advanced-post-list/includes/class/APLCore.php on line 2062 and defined in /home/ryharv/sellwoodconsulting.com/wp-content/plugins/advanced-post-list/includes/class/apl-shortcodes.php on line 1521

    https://www.sellwoodconsulting.com/library/

    Plugin Author EkoJR

    (@ekojr)

    Thank you for posting additional info.

    This does seem odd, considering I tested and developed in PHP7, but it seems to conflict when updating.

    I’ll try to push a hot-fix on this this weekend. I have an idea what’s going on, but I’ve been a bit tied up at the moment.

    Plugin Author EkoJR

    (@ekojr)

    Also, it might help to revert back to 0.3.1. There should be no conflicts reverting back till an update is released.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    @ekojr – in apl-shortcodesphp on line 1521 you’re calling this:

    public function final_end($content)

    That means its waiting for some value for $content ??

    But on APLCore.php on line 2062 you do this:

    
                if (strrpos($output, "[final_end]"))
                {
                    $internal_shortcodes->final_end();
                }
    

    So literally it doesn’t pass anything through as $content for the function, hence the error ??

    Plugin Author EkoJR

    (@ekojr)

    (sigh)…figures it would be something simple…like a typo. Thanks for looking into the matter btw.

    I recently encapsulated all the internal shortcodes, and thought I had double checked everything after completely rewriting the functions into an object.

    I’ll get this added into the public release. Thank you @ipstenu

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I did the same mistakes recently and spent a weekend debugging things that worked on my 7.0 dev box but not the live one. Happens to all of us ??

    Thread Starter Bravo315

    (@bravo315)

    Many thanks for for looking into this guys! Will mark as resolved when the update is pushed.

    Plugin Author EkoJR

    (@ekojr)

    Hey @bravo315 after looking into the issue. I believe your issue is different then the solution provided, but is aimed more towards @ryharv problem.

    You said you have a fatal error with “Call to undefined function mb_internal_encoding()”, and I’ve found it isn’t an issue with APL, but with the server installed modules.

    Another thread on WordPress has the same issue: Fatal Error undefined function mb_internal_encoding().

    Sure enough, there were no instances of APL in either documents, but 100% if it’s designed like that and the Call() is actually the problem.

    You are correct! APL was design as a singleton to keep the plugin as one instance within the WP environment, and it seems you are correct on the last part as well. The server host is missing the mbstring module after updating to PHP7.

    I believe you’ll need to contact your hosting provider to have them install mbstring module.

    However, I can correct Undefined index: post__not_in. Which is just a debug Notice really.

    • This reply was modified 8 years ago by EkoJR.
    • This reply was modified 8 years ago by EkoJR.
    • This reply was modified 8 years ago by EkoJR. Reason: name typo
    ryharv

    (@ryharv)

    My host is Dreamhost and I just looked back at their announcement regarding the PHP upgrade. They actually upgraded PHP to version 5.6, not version 7.

    For what it’s worth and I hope it’s helpful. I’ll also ask them to install mbstring.

    ryharv

    Plugin Author EkoJR

    (@ekojr)

    No, @ryharv. You’re fix is in the update I’m about to push. I guess I said it in a rather confusing way. Just keep an eye on the update (I normally push at 00:00 UTC).

    Bummer I can’t go back and edit that comment now.

    • This reply was modified 8 years ago by EkoJR.
    ryharv

    (@ryharv)

    aha, thank you. will look for it and thanks for being on top of the update so quickly.

    ryharv

    (@ryharv)

    I haven’t seen an update yet; has it been released?

    Plugin Author EkoJR

    (@ekojr)

    I just released the update on WordPress (released it on GitHub last night). I was gonna release an 2 hours earlier, but I was mainly waiting til it was a Monday.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Issues when upgrading to PHP7’ is closed to new replies.