WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.46k stars 4.18k forks source link

Activating AMP plugin in Reader mode crashes Gutenberg #32082

Closed yanchuk closed 3 years ago

yanchuk commented 3 years ago

Description

As I activate AMP plugin in our setup in Reader more – I can't edit posts as Gutenberg crashes showing an error (see below). The issue also reported to AMP team

Console: data.min.js?ver=943087ae96d075f126df689839bb96b9:2 An error occurred while running 'mapSelect': Failed to construct 'URL': Invalid URL Ge @ data.min.js?ver=943087ae96d075f126df689839bb96b9:2 react-dom.min.js?ver=16.13.1:125 Error: Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?invariant=152&args[]=o for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at react-dom.min.js:82 at T (react-dom.min.js:95) at Ie (react-dom.min.js:104) at rh (react-dom.min.js:103) at zj (react-dom.min.js:228) at Th (react-dom.min.js:152) at tj (react-dom.min.js:152) at Te (react-dom.min.js:146) at react-dom.min.js:61 at unstable_runWithPriority (react.min.js:25)

Copy error from WP interface: Error: Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?invariant=152&args[]=o for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:82:8 at T (https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:95:457) at Ie (https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:104:98) at rh (https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:103:334) at zj (https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:228:490) at Th (https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:152:223) at tj (https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:152:152) at Te (https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:146:151) at https://xxx.io/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:61:68 at unstable_runWithPriority (https://xxx.io/wp-includes/js/dist/vendor/react.min.js?ver=16.13.1:25:260)

Step-by-step reproduction instructions

  1. Go to AMP plugin settings
  2. Change to Reader mode
  3. Save
  4. Go to all Posts
  5. Try to edit any post

Expected behaviour

Using AMP Reader more shouldn't crash WordPress editor

Actual behaviour

Using AMP Reader more crashes WordPress editor

Screenshots or screen recording (optional)

Screenshot: https://monosnap.com/file/rpes5srBGUjg9o2rxUFsEwf7jQrirH Video: https://www.loom.com/share/e85ac60486d44ba8ad4620ab3e1f5707

WordPress information

wp-core

version: 5.7.2 site_language: en_GB user_language: en_GB timezone: Europe/London permalink: /blog/%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: undefined environment_type: production user_count: 25 dotorg_communication: true

wp-paths-sizes

wordpress_path: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html wordpress_size: 3.64 GB (3905393837 bytes) uploads_path: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/uploads uploads_size: 1.99 GB (2138884388 bytes) themes_path: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/themes themes_size: 190.78 MB (200044017 bytes) plugins_path: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/plugins plugins_size: 132.18 MB (138596341 bytes) database_size: 233.38 MB (244711424 bytes) total_size: 6.17 GB (6627630007 bytes)

wp-dropins (1)

advanced-cache.php: true

wp-active-theme

name: Crunch (xxx) version: 6.0.0 author: xxx author_website: (undefined) parent_theme: none theme_features: core-block-patterns, menus, post-thumbnails, title-tag, wp-block-styles, html5 theme_path: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/themes/xxx auto_update: Disabled

wp-mu-plugins (1)

WP Migrate DB Pro Compatibility: version: 1.2, author: Delicious Brains

wp-plugins-active (34)

ACF Content Analysis for Yoast SEO: version: 3.0.1, author: Thomas Kräftner, ViktorFroberg, marol87, pekz0r, angrycreative, Team Yoast, Auto-updates enabled Advanced Custom Fields PRO: version: 5.9.5, author: Elliot Condon (latest version: 5.9.6), Auto-updates enabled AMP: version: 2.1.2, author: AMP Project Contributors, Auto-updates disabled Better Search Replace: version: 1.3.4, author: Delicious Brains, Auto-updates disabled Cookie Notice & Compliance for GDPR / CCPA: version: 2.0.4, author: Hu-manity.co, Auto-updates enabled Custom Post Type UI: version: 1.9.1, author: WebDevStudios, Auto-updates enabled EmbedPress: version: 2.7.7, author: WPDeveloper (latest version: 3.0.0), Auto-updates disabled Head, Footer and Post Injections: version: 3.2.2, author: Stefano Lissa, Auto-updates disabled Hustle: version: 7.4.4, author: WPMU DEV, Auto-updates enabled LuckyWP Table of Contents: version: 2.1.4, author: LuckyWP, Auto-updates enabled Make Paths Relative: version: 1.1.2, author: YAS Global Team, Auto-updates enabled Notification: version: 7.2.4, author: BracketSpace, Auto-updates enabled Open Graph and Twitter Card Tags: version: 3.1.1, author: Webdados, Auto-updates enabled Prismatic: version: 2.7, author: Jeff Starr, Auto-updates enabled Redirection: version: 5.1.1, author: John Godley, Auto-updates enabled Regenerate Thumbnails: version: 3.1.5, author: Alex Mills (Viper007Bond), Auto-updates disabled Regenerate Thumbnails Advanced: version: 2.4.0, author: ShortPixel, Auto-updates disabled Smush: version: 3.8.5, author: WPMU DEV, Auto-updates enabled SVG Support: version: 2.3.18, author: Benbodhi, Auto-updates enabled UpdraftPlus - Backup/Restore: version: 1.16.56, author: UpdraftPlus.Com, DavidAnderson, Auto-updates disabled Velvet Blues Update URLs: version: 3.2.10, author: VelvetBlues.com, Auto-updates enabled WebP Converter for Media: version: 3.0.1, author: Mateusz Gbiorczyk, Auto-updates enabled Wordfence Security: version: 7.5.3, author: Wordfence, Auto-updates enabled WordPress Comments Import & Export: version: 2.2.7, author: WebToffee, Auto-updates enabled WP Activity Log: version: 4.3.0, author: WP White Security, Auto-updates enabled WP File Manager: version: 7.1.1, author: mndpsingh287, Auto-updates enabled WP Migrate DB Pro: version: 2.0.2, author: Delicious Brains, Auto-updates enabled WP Migrate DB Pro Media Files: version: 2.0.1, author: Delicious Brains, Auto-updates enabled WP Migrate DB Pro Theme & Plugin Files: version: 1.1, author: Delicious Brains, Auto-updates enabled WP Rocket: version: 3.8.8, author: WP Media (latest version: 3.9), Auto-updates disabled WPS Hide Login: version: 1.8.5, author: WPServeur, NicolasKulka, wpformation, Auto-updates enabled Yoast Duplicate Post: version: 4.1.2, author: Enrico Battocchi & Team Yoast, Auto-updates enabled Yoast SEO: version: 16.3, author: Team Yoast, Auto-updates enabled Yoast Test Helper: version: 1.14, author: Team Yoast, Auto-updates disabled

wp-plugins-inactive (5)

MalCare Security - Free Malware Scanner, Protection & Security for WordPress: version: 4.58, author: MalCare Security, Auto-updates disabled Media Sync: version: 1.2.5, author: Erol Živina, Auto-updates disabled Social Snap: version: 1.1.15, author: Social Snap, Auto-updates enabled WordPress Importer: version: 0.7, author: wordpressdotorg, Auto-updates enabled WP Rocket | Exclude Files from Defer JS: author: WP Rocket Support Team, version: (undefined), Auto-updates enabled

wp-media

image_editor: WP_Image_Editor_Imagick imagick_module_version: 1687 imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org file_uploads: File uploads is turned off post_max_size: 10M upload_max_filesize: 10M max_effective_size: 10 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 8 GB imagick::RESOURCETYPE_DISK: 1.844674407371E+19 imagick::RESOURCETYPE_FILE: 768 imagick::RESOURCETYPE_MAP: 8 GB imagick::RESOURCETYPE_MEMORY: 4 GB imagick::RESOURCETYPE_THREAD: 1 gd_version: 2.2.5 ghostscript_version: 9.26

wp-server

server_architecture: Linux 4.9.0-15-amd64 x86_64 httpd_software: Apache/2.4.25 (Debian) php_version: 7.4.18 64bit php_sapi: fpm-fcgi max_input_variables: 2500 time_limit: 60 memory_limit: 256M max_input_time: 60 upload_max_filesize: 10M php_post_max_size: 10M curl_version: 7.52.1 OpenSSL/1.0.2u suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: true

wp-database

extension: mysqli server_version: 10.1.48-MariaDB-1~stretch client_version: mysqlnd 7.4.18

wp-constants

WP_HOME: https://xxx.io WP_SITEURL: https://xxx.io WP_CONTENT_DIR: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content WP_PLUGIN_DIR: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: undefined

wp-filesystem

wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable

luckywp-table-of-contents

domVersion: 20031129 libxmlVersion: 2.9.9 intlVersion: 7.4.18 icuVersion: 65.1 settings: {"lwptoc_general":{"min":"2","depth":"3","hierarchical":true,"numeration":"none","numerationSuffix":"none","title":"Table of Contents","toggle":false,"labelShow":"show","labelHide":"hide","hideItems":false,"smoothScroll":true,"smoothScrollOffset":"75"},"lwptoc_appearance":{"width":"full","float":"left","titleFontSize":"18px","titleFontWeight":"semibold","itemsFontSize":"90%","colorScheme":"light","backgroundColor":"#ffffff","borderColor":null,"titleColor":"#1a2e44","linkColor":"#202c45","hoverLinkColor":"#22d172","visitedLinkColor":"#202c45"},"lwptoc_autoInsert":{"enable":false,"position":"beforefirstheading","postTypes":["post"]},"lwptoc_processingHeadings":{"postTypes":["post"]},"lwptoc_misc":{"skipHeadingLevel":"","skipHeadingText":"Share this:","hashFormat":"asheading","hashConvertToLowercase":false,"hashReplaceUnderlinesToDashes":true,"wrapNoindex":false,"useNofollow":false,"showMetaboxPostTypes":"","listMarkupTags":"ul","containerClass":""}}

amp_wp

amp_slug_query_var: amp amp_slug_defined_late: false amp_mode_enabled: reader amp_reader_theme: legacy amp_templates_enabled: post amp_serve_all_templates: This option does not apply to reader mode. amp_css_transient_caching_disabled: false amp_css_transient_caching_threshold: 5000 transients per day amp_css_transient_caching_sampling_range: 14 days amp_css_transient_caching_transient_count: 96 amp_css_transient_caching_time_series: 20210507: 0 20210508: 30 20210509: 30 20210510: 46 20210511: 46 20210512: 47 20210513: 47 20210514: 47 20210515: 46 20210516: 46 20210517: 46 20210518: 95 20210519: 96 20210520: 96 amp_libxml_version: 2.9.9

Device information

westonruter commented 3 years ago

I think there's a conflict with one of the other plugins you have active rather than the block editor and the AMP plugin. Since you've already reported to the AMP repo, I'll close this and we can continue investigating with you on our side.