RankMath and AMP issues
-
AMP is flagging the following as issues and removing the scripts:
Issue #1
Element name
script
Parent element
head
Sources
#1 Type: Plugin
Name: Rank Math SEO (seo-by-rank-math)
Function: RankMath\Frontend\Frontend::enqueue()
Action: wp_enqueue_scripts (priority 10)
Enqueued Script: rank-math
Dependent Script: jquery-core
Location: includes/frontend/class-frontend.php:102
#2 Type: Core
Name: wp-includes
Function: wp_enqueue_scripts()
Action: wp_head (priority 1)
Enqueued Script: rank-math
Dependent Script: jquery-core
Location: script-loader.php:2288
#3 Type: Core
Name: wp-includes
Function: wp_default_scripts()
Action: wp_default_scripts (priority 10)
Enqueued Script: jquery
Dependent Script: jquery-core
Location: script-loader.php:583
#5 Type: Core
Name: wp-includes
Function: WP_Widget_Factory::_register_widgets()
Action: widgets_init (priority 100)
Enqueued Script: jquery
Dependent Script: jquery-core
Location: class-wp-widget-factory.php:89
#7 Type: Core
Name: wp-includes
Function: wp_widgets_init()
Action: init (priority 1)
Enqueued Script: jquery
Dependent Script: jquery-core
Location: widgets.php:1717
#9 Type: Core
Name: wp-includes
Function: wp_default_scripts()
Action: wp_default_scripts (priority 10)
Enqueued Script: jquery-core
Location: script-loader.php:583
#11 Type: Core
Name: wp-includes
Function: WP_Widget_Factory::_register_widgets()
Action: widgets_init (priority 100)
Enqueued Script: jquery-core
Location: class-wp-widget-factory.php:89
#13 Type: Core
Name: wp-includes
Function: wp_widgets_init()
Action: init (priority 1)
Enqueued Script: jquery-core
Location: widgets.php:1717
#15 Type: Core
Name: wp-includes
Function: wp_print_head_scripts()
Action: wp_head (priority 9)
Location: script-loader.php:2242——–
Issue #2
Element name
script
Parent element
body
Sources
#1 Type: Plugin
Name: Rank Math SEO (seo-by-rank-math)
Function: RankMath\Frontend\Frontend::enqueue()
Action: wp_enqueue_scripts (priority 10)
Enqueued Script: rank-math
Location: includes/frontend/class-frontend.php:102
#2 Type: Core
Name: wp-includes
Function: wp_enqueue_scripts()
Action: wp_head (priority 1)
Enqueued Script: rank-math
Location: script-loader.php:2288
#3 Type: Core
Name: wp-includes
Function: wp_print_footer_scripts()
Action: wp_footer (priority 20)
Location: script-loader.php:2271
#4 Type: Core
Name: wp-includes
Function: _wp_footer_scripts()
Action: wp_print_footer_scripts (priority 10)
Location: script-loader.php:2261———-
Issue #3
Element attributes
type text/javascript
Element name
script
Parent element
body
Text content/* <![CDATA[ */
var rankMath = {“version”:”1.0.44.1″,”ajaxurl”:”https:\/\/mydomainname.com\/wp-admin\/admin-ajax.php”,”adminurl”:”https:\/\/mydomainname.com\/wp-admin\/admin.php”,”endpoint”:”https:\/\/mydomainname.com\/wp-json\/rankmath\/v1″,”security”:”6d1c067ed7″,”restNonce”:”e1864d9f1f”,”objectID”:2850,”objectType”:”post”};/* ]]> */
Sources
#1 Type: Plugin
Name: Rank Math SEO (seo-by-rank-math)
Function: MyThemeShop\Json_Manager::output()
Action: wp_footer (priority 0)
Location: vendor/mythemeshop/wordpress-helpers/src/class-json-manager.php:79Kindly advise
TIA
I am using:
Name Twenty Twenty (twentytwenty) Version 1.4
Wordpress Version 5.4.2
Server architecture Linux 5.3.0-1018-gcp x86_64
Web server Apache
PHP version 7.4.6 (Supports 64bit values)
Extension mysqli
Server version 5.7.29-32-log
Client version mysqlnd 7.4.6
AMP mode enabled standard
Templates enabled post, page, attachment, is_singular, is_front_page, is_home, is_archive, is_author, is_date, is_search, is_404, is_category, is_tag
Serve all templates as AMP? true
- The topic ‘RankMath and AMP issues’ is closed to new replies.