Accelerated-mobile-pages: PHP Errors in latest version 0.9.97.46.1 after activation on fresh WP installation

Created on 15 Apr 2019  路  22Comments  路  Source: ahmedkaludi/accelerated-mobile-pages

After installing and activation latest plugin version (0.9.97.46.1) on fresh WP installation (WP 5.1.1 with debug = on) get a lot of PHP errors (previous plugin versions worked fine):


Notice: Undefined index: amp-on-off-for-all-pages in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/install/index.php on line 69

Notice: Undefined index: amp-design-selector in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/accelerated-moblie-pages.php on line 776

Notice: Undefined index: ampforwp-custom-logo-dimensions in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/options/admin-config.php on line 1220

And a lot of errors related to this first errors.

NEXT UPDATE Urgent bug

All 22 comments

Need to use ampforwp_get_setting on all places this will resolve the issue.

Need to use ampforwp_get_setting on all places this will resolve the issue.

But this error in your plugin files itself (not in some theme files that use plugin), when release with fixes for this will be available? I just activated plugin on fresh WP and default theme.

Yes, these warnings are from the pluign itself.

These are just the warnings (and will not effect anything interms of pluign performance) and you can disable it by turning off the debug mode from your wp-config.php file or if you save the settings once these warnings will disappear.

And we Will fix these issues in upcoming updates, might take two weeks to fix and push it live.

Yes, these warnings are from the pluign itself.

These are just the warnings (and will not effect anything interms of pluign performance) and you can disable it by turning off the debug mode from your wp-config.php file or if you save the settings once these warnings will disappear.

And we Will fix these issues in upcoming updates, might take two weeks to fix and push it live.

This is very bad, because this plugin included with themes that will not pass review with this errors (themes tested by reviewers with debug mode). Do you know what previous plugin version we can use to avoid this errors, or this affect previous versions too? (but I don't get this errors before).

Let me check it out and will get back to you.

need to make sure this code is there in ampforwp_get_setting function

https://github.com/ahmedkaludi/accelerated-mobile-pages/commit/5e2798a5165d6b7dcd0acfa1952fbba184d9a87f#diff-260eba6333c3222e59a6aed22ac5ab37L1248

Make sure to add the below code in ampforwp_get_setting function when merging this ticket.
if(empty($redux_builder_amp)){ $redux_builder_amp = (array)get_option('redux_builder_amp'); }

* Review *

  • [x] Kaleem

  • [x] Imran

:+1: ready to merge

When this fix will be available? (at least for manual download before official release).

@dedalx,
It will be added in the v0.9.97.48 and we're planning to release this today evening or maybe tomorrow morning.

Pushed in 0.9.97.48

I am not sure how you test your plugin activation with Debug mode enabled on fresh WordPress installation, but you don't fixed all errors and now have much more new similar PHP notice errors on activation:

Notice: Undefined index: amp-analytics-select-option in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/features/analytics/analytics-options.php on line 6
(this errors appears few times in some loop)

Notice: Undefined index: amp-opt-color-rgba-colorscheme in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/options/admin-config.php on line 3326
Notice: Undefined index: amp-design-selector in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/options/admin-config.php on line 5941

Still get some old errors that I reported before:

Notice: Undefined index: ampforwp-homepage-on-off-support in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/features/functions.php on line 38
Notice: Undefined index: amp-frontpage-select-option in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/features/functions.php on line 41
Notice: Undefined index: ampforwp-homepage-on-off-support in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/features/functions.php on line 38
Notice: Undefined index: amp-frontpage-select-option in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/features/functions.php on line 41

And yes, I use latest version Version 0.9.97.48 from WordPress.org on fresh installation.

@dedalx, We are sorry for the inconvenience.
I have noted the warnings reported by you here: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/3085. We will resolve it ASAP.
Please follow that ticket for more info.

@dedalx, We are sorry for the inconvenience.
I have noted the warnings reported by you here: #3085. We will resolve it ASAP.
Please follow that ticket for more info.

Any updates on this issues?

Old issues is fixed now, but I get new error on activation...

Notice: Undefined index: amp-design-selector in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/options/admin-config.php on line 5995

@dedalx, We are sorry for the inconvenience.
I have noted the warnings reported by you here: #3085. We will resolve it ASAP.
Please follow that ticket for more info.

Any updates on this issues?

3085 ticket has been fixed and pushed in last update and

Old issues is fixed now, but I get new error on activation...

Notice: Undefined index: amp-design-selector in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/options/admin-config.php on line 5995

This debug has been added #3103 and will be fixed and pushed in next update.

@MohammedKaludi Thanks, when next update will be released on WordPress.org?

It will be pushed in todays update

@MohammedKaludi Great, thanks!

I found new similar error so I post it here. It appears when your plugin is activated and you visit WooCommerce page (Shop, Single product, etc) with Debug = on:

Undefined variable: wp in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 321

More errors just in Post:

Notice: Undefined index: amp-core-end-point in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 200
Notice: Undefined index: amp-core-end-point in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/includes/features/functions.php on line 538
Notice: Undefined index: ga-feild in /Volumes/Storage/MAMP/htdocs/wp-test/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5819

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  6Comments

jeherve picture jeherve  路  8Comments

carloosamarante picture carloosamarante  路  6Comments

beingsmart3 picture beingsmart3  路  7Comments

prayagverma picture prayagverma  路  3Comments