Title: debug 0.9.49
Last modified: May 12, 2017

---

# debug 0.9.49

 *  [infokurs](https://wordpress.org/support/users/infokurs/)
 * (@infokurs)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/debug-0-9-49/)
 *     ```
       [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](https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/827)
   before relase.
    Live [test page](http://defiant-bat.w3.poopy.life/), [debug log](http://defiant-bat.w3.poopy.life/wp-content/debug.log)
    -  This topic was modified 9 years, 1 month ago by [infokurs](https://wordpress.org/support/users/infokurs/).

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Contributor [ampforwp](https://wordpress.org/support/users/ampforwp/)
 * (@ampforwp)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9127664)
 * Hey [@infokurs](https://wordpress.org/support/users/infokurs/),
 * Are you sure,that you are getting the issue with our latest release? If yes please
   contact us at [team@magazine3.com](https://wordpress.org/support/topic/debug-0-9-49/team@magazine3.com?output_format=md)
 * Regards,
    Mohammed Asif.
 *  Thread Starter [infokurs](https://wordpress.org/support/users/infokurs/)
 * (@infokurs)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9127720)
 * Yes `<!--Plugin Version :0.9.49 -->`
    More info sent via mail.
 *  [dogacankanat](https://wordpress.org/support/users/dogacankanat/)
 * (@dogacankanat)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9128736)
 * 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
 *  [dogacankanat](https://wordpress.org/support/users/dogacankanat/)
 * (@dogacankanat)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9128819)
 * 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 9 years, 1 month ago by [dogacankanat](https://wordpress.org/support/users/dogacankanat/).
      Reason: code box breakdown
 *  [WPO+](https://wordpress.org/support/users/ivanpr/)
 * (@ivanpr)
 * [9 years ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9136997)
 * 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
 *  [WPO+](https://wordpress.org/support/users/ivanpr/)
 * (@ivanpr)
 * [9 years ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9137018)
 * p.s. You have several non-closed shortcodes in the bottom of [https://ampforwp.com/story/?ThanksUser](https://ampforwp.com/story/?ThanksUser)
 * Screenshot: [http://img02.imgland.net/KuQ3QKf.png](http://img02.imgland.net/KuQ3QKf.png)
 *  [WPO+](https://wordpress.org/support/users/ivanpr/)
 * (@ivanpr)
 * [9 years ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9137180)
 * $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](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [9 years ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9164256)
 * Hey [@ivanpr](https://wordpress.org/support/users/ivanpr/) & [@dogacankanat](https://wordpress.org/support/users/dogacankanat/)&
   [@infokurs](https://wordpress.org/support/users/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
 *  [WPO+](https://wordpress.org/support/users/ivanpr/)
 * (@ivanpr)
 * [9 years ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9166074)
 * Hello Ahmed, please see my above solution.
    It perfectly worked for me.
 *  [rocky1223](https://wordpress.org/support/users/rocky1223/)
 * (@rocky1223)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9295064)
 * 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](https://wordpress.org/support/users/ampforwp/)
 * (@ampforwp)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9297559)
 * Hey [@rocky1223](https://wordpress.org/support/users/rocky1223/),
 * Is this happening with the latest version only or with previous versions as well?
 * Regards
    Marqas
 *  [rocky1223](https://wordpress.org/support/users/rocky1223/)
 * (@rocky1223)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9298208)
 * 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.
 *  [rocky1223](https://wordpress.org/support/users/rocky1223/)
 * (@rocky1223)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9299308)
 * 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](https://wordpress.org/support/users/ampforwp/)
 * (@ampforwp)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9300621)
 * Hi [@rocky1223](https://wordpress.org/support/users/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](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.

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

## Tags

 * [line-39](https://wordpress.org/support/topic-tag/line-39/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [Post_ID](https://wordpress.org/support/topic-tag/post_id/)
 * [style](https://wordpress.org/support/topic-tag/style/)
 * [wp_content_dir](https://wordpress.org/support/topic-tag/wp_content_dir/)

 * 15 replies
 * 6 participants
 * Last reply from: [ampforwp](https://wordpress.org/support/users/ampforwp/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/debug-0-9-49/#post-9300621)
 * Status: not resolved