• [12-May-2017 19:40:45 UTC] PHP Notice:  Trying to get property of non-object in /var/www/public/defiant-bat/wp-content/plugins/accelerated-mobile-pages/accelerated-moblie-pages.php on line 39
    [12-May-2017 19:40:45 UTC] PHP Notice:  AMP_Post_Template::verify_and_include was called <strong>incorrectly</strong>. Path validation for template () failed. Path cannot traverse and must be located in <code>WP_CONTENT_DIR</code>. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 0.1.) in /var/www/public/defiant-bat/wp-includes/functions.php on line 4138
    [12-May-2017 19:40:45 UTC] PHP Notice:  Undefined variable: post_id in /var/www/public/defiant-bat/wp-content/plugins/accelerated-mobile-pages/templates/design-manager/design-2/style.php on line 10
    [12-May-2017 19:40:45 UTC] PHP Notice:  Undefined index: opt-color-rgba in /var/www/public/defiant-bat/wp-content/plugins/accelerated-mobile-pages/templates/design-manager/design-2/style.php on line 245

    Partial reported in #827 before relase.
    Live test page, debug log

    • This topic was modified 2 years, 8 months ago by infokurs.
Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor ampforwp

    (@ampforwp)

    Hey @infokurs,

    Are you sure,that you are getting the issue with our latest release? If yes please contact us at team@magazine3.com

    Regards,
    Mohammed Asif.

    Yes <!--Plugin Version :0.9.49 -->
    More info sent via mail.

    Hello,
    I am receiving the same PHP notice too and 1 error after updating to the latest version 0.9.49

    PHP Notice: Trying to get property of non-object in /data/www/xxxxx/website/www/wp-content/plugins/accelerated-mobile-pages/accelerated-moblie-pages.php on line 39

    // Frontpage and Blog page check from reading settings.
    function ampforwp_name_blog_page() {
    	$page_for_posts  =  get_option( 'page_for_posts' );
    	$post = get_post($page_for_posts); 
    	$slug = $post->post_name;
    	return $slug;
    }
    function ampforwp_custom_post_page() {
    	$front_page_type  =  get_option( 'show_on_front' );
    	return $front_page_type;
    }

    line 39 is exactly $slug = $post->post_name;

    Second error is:
    Undefined index: type in /data/www/xxxx/website/www/wp-content/plugins/accelerated-mobile-pages/includes/options/redux-core/framework.php on line 2962

    WordPress 4.7.4
    PHP 7.1.4

    Several more PHP notices popped up after update, so I am adding them here. I guess they can be fixed with some small code changes.

    PHP Notice: Use of undefined constant AMPFORWP_DM_SOCIAL_CHECK - assumed 'AMPFORWP_DM_SOCIAL_CHECK' in /data/www/xxxxx/website/www/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 344

    PHP Notice: Function AMP_Post_Template::verify_and_include has not been used in the right way. Path validation for template () failed. Path cannot traverse and must be located in WP_CONTENT_DIR. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (Tato zpráva se nově zobrazuje od verze 0.1.) in /data/www/xxxxx/website/www/wp-includes/functions.php on line 4138

    PHP Notice: Undefined variable: post_id in /data/www/xxxxx/website/www/wp-content/plugins/accelerated-mobile-pages/templates/design-manager/design-3/style.php on line 5

    PHP Notice: Undefined index: opt-color-rgba in /data/www/xxxxx/website/www/wp-content/plugins/accelerated-mobile-pages/templates/design-manager/design-3/style.php on line 318

    WordPress 4.7.4
    PHP 7.1.4

    • This reply was modified 2 years, 8 months ago by dogacankanat. Reason: code box breakdown

    Same issue in the frontend:
    Trying to get property of non-object in …accelerated-moblie-pages.php on line 39

    The installation process ended with the following error:
    Notice: Trying to get property of non-object in \www\blog\wp-content\plugins\accelerated-mobile-pages\accelerated-moblie-pages.php on line 39

    Warning: Cannot modify header information – headers already sent by (output started at \www\blog\wp-content\plugins\accelerated-mobile-pages\accelerated-moblie-pages.php:39) in \www\blog\wp-includes\pluggable.php on line 1195

    Warning: Cannot modify header information – headers already sent by (output started at \www\blog\wp-content\plugins\accelerated-mobile-pages\accelerated-moblie-pages.php:39) in \www\blog\wp-includes\pluggable.php on line 1195

    p.s. You have several non-closed shortcodes in the bottom of https://ampforwp.com/story/?ThanksUser

    Screenshot: http://img02.imgland.net/KuQ3QKf.png

    $page_for_posts in …accelerated-moblie-pages.php on line 39 returns ‘0’ outside of the Loop all the way in the top of the pages [including Homepage].

    The function in …accelerated-moblie-pages.php on line 39 needs to be changed to:
    function ampforwp_name_blog_page() {
    if(!$page_for_posts = get_option( ‘page_for_posts’ )) return;
    $post = get_post($page_for_posts);
    $slug = $post->post_name;
    return $slug;
    }

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hey @ivanpr & @dogacankanat & @infokurs

    I’m giving this thread my highest priority. I’m also asking our lead developer to follow up with you guys until this problem is solved.

    You guys will hear from us soon. But we will you to be there for us for the testing.

    Regards,
    Ahmed

    Hello Ahmed, please see my above solution.
    It perfectly worked for me.

    Same with me , `Notice: Undefined variable: post_type in /home/xxx/public_html/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 29

    Notice: Undefined index: ampforwp_amp_mode in /home/xxx`/public_html/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 33

    Plugin Contributor ampforwp

    (@ampforwp)

    Hey @rocky1223,

    Is this happening with the latest version only or with previous versions as well?

    Regards
    Marqas

    Well , it is with the latest version.

    On the sidebars of add new post :

    Notice: Undefined index: ampforwp-amp-on-off in /home/xxx/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 1097
    Show Hide
    Toggle panel: Mobile Redirection for Current Page?
    Mobile Redirection for Current Page?

    Notice: Undefined index: ampforwp-redirection-on-off in /home/xxx/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 1182
    Enable Disable

    What could be the problem? Please solve, a site with errors may lose sponsored posts and clients.

    Bro, i also request a new feature , Indian payment gateway so that we Indians buy extensions.

    Credit card or paypal restricts Indian buyers.

    I love this app and pretty useful.

    All the best ,
    Rakesh
    Hyderabad,
    telangana

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @rocky1223,

    I have created a ticket about it in our Github and it will be resolved in our next updates.

    Reference of this ticket: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/950

    Regards
    Marqas

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘debug 0.9.49’ is closed to new replies.