pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Conflict with CF7 Smart Grid Design Extension #6087

Closed philmck closed 3 years ago

philmck commented 3 years ago

Description

When both the "Pods" plugin and the "CF7 Smart Grid Design Extension" plugin are enabled on a WordPress site, it is impossible to create or edit forms in Contact Form 7 Grid view. The problem has been reported before (at least 2 years ago) and each side is blaming the other, see for example https://wordpress.org/support/topic/pods-conflict/

Testing instructions

  1. Install and enable "Pods" and "CF7 Smart Grid Design Extension" plugins. Disable all other plugins and switch to theme "Twenty twenty-one".
  2. Click on Contact > Add new.
  3. An error message pops up saying "The editor failed to load. You may recover your form by copying it into a new form editor, do you wish to continue?"
  4. Click 'OK' or 'Cancel' (otherwise everything is frozen). An edit screen is displayed but without any smart grid buttons or functionality. In the console of the Chrome inspector I see error message: post.php?post=11818&action=edit:3661 Uncaught TypeError: Cannot read property 'noConflict' of undefined at post.php?post=11818&action=edit:3661 and warning DevTools failed to load source map: Could not load content for https://www.mysite.com/wp-content/plugins/cf7-grid-layout/assets/css.gs/smart-grid.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Expected behavior

A CF7 smart grid editing screen, including a column grid and tabs "Grid" and ""

Screenshots / screencast

error popup

console

Possible workaround

None found.

Pods version

2.7.30

Other super helpful information

WordPress Environment I've reproduced this problem on several sites, but not all (on the same server). I have yet to find a significant difference between sites that are affected and ones that aren't. I've checked they have the same PHP versions and resource limits, for example. This happens even with all other plugins disabled and a standard theme, so I guess something in the content triggers it. (Note that the details below are from a live site though, not with everything else disabled) ``` ` ### wp-core ### version: 5.8 site_language: en_GB user_language: en_GB timezone: Europe/London permalink: /%category%/%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: closed environment_type: production user_count: 139 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /home/bromleysymph/public_html wordpress_size: 836.06 MB (876677237 bytes) uploads_path: /home/bromleysymph/public_html/wp-content/uploads uploads_size: 13.40 GB (14390770445 bytes) themes_path: /home/bromleysymph/public_html/wp-content/themes themes_size: 5.06 MB (5306848 bytes) plugins_path: /home/bromleysymph/public_html/wp-content/plugins plugins_size: 403.65 MB (423252717 bytes) database_size: 287.34 MB (301301760 bytes) total_size: 14.90 GB (15997309007 bytes) ### wp-dropins (2) ### advanced-cache.php: true object-cache.php: true ### wp-active-theme ### name: Bromley Symphony (bsotheme) version: 1.0.0 author: Beeches IT author_website: https://www.beechesit.uk/ parent_theme: none theme_features: core-block-patterns, widgets-block-editor, automatic-feed-links, title-tag, post-thumbnails, menus, html5, custom-background, custom-header, infinite-scroll, jetpack-responsive-videos, widgets theme_path: /home/bromleysymph/public_html/wp-content/themes/bsotheme auto_update: Disabled ### wp-themes-inactive (1) ### Twenty Twenty-One: version: 1.4, author: the WordPress team, Auto-updates enabled ### wp-plugins-active (25) ### Accept Stripe Payments: version: 2.0.47, author: Tips and Tricks HQ, wptipsntricks, Auto-updates enabled Adminimize: version: 1.11.7, author: Frank Bültge, Auto-updates enabled Advanced Editor Tools (previously TinyMCE Advanced): version: 5.6.0, author: Automattic, Auto-updates enabled Akismet Anti-Spam: version: 4.1.10, author: Automattic, Auto-updates enabled Arconix FAQ: version: 1.9.2, author: Tyche Softwares, Auto-updates enabled Broken Link Checker: version: 1.11.15, author: WPMU DEV, Auto-updates enabled CF7 Smart Grid Design Extension: version: 4.10.0, author: Aurovrata V., Auto-updates enabled Contact Form 7: version: 5.4.2, author: Takayuki Miyoshi, Auto-updates enabled Contact Form 7 CiviCRM integration: version: 1.8, author: Jaap Jansma, Auto-updates enabled Envira Gallery Lite: version: 1.8.3.7, author: Envira Gallery Team, Auto-updates enabled Events Manager: version: 5.11, author: Marcus Sykes, Auto-updates enabled Master Slider: version: 3.7.8, author: averta, Auto-updates enabled Pods - Custom Content Types and Fields: version: 2.7.30, author: Pods Framework Team, Auto-updates enabled Pods Alternative Cache: version: 2.1.1, author: Pods Framework Team, Auto-updates disabled Shortcodes Ultimate: version: 5.10.2, author: Vladimir Anokhin, Auto-updates enabled Simple Download Monitor: version: 3.9.3, author: Tips and Tricks HQ, Ruhul Amin, Josh Lobe, Auto-updates enabled TicketSource Events: version: 2.0.0, author: TicketSource, Auto-updates enabled Title Remover: version: 1.2.1, author: WPGurus, Auto-updates enabled User Switching: version: 1.5.7, author: John Blackbourn & contributors, Auto-updates enabled W3 Total Cache: version: 2.1.6, author: BoldGrid, Auto-updates enabled Widget Options: version: 3.7.9, author: Widget Options Team, Auto-updates enabled Wordfence Security: version: 7.5.5, author: Wordfence, Auto-updates enabled WP-Matomo Integration: version: 1.0.26, author: André Bräkling, Auto-updates enabled WPDM - Extended Short-codes: version: 2.8.2, author: Shaon, Auto-updates enabled WP Fail2Ban Redux: version: 0.8.2, author: Brandon Allen, Auto-updates enabled ### wp-plugins-inactive (8) ### Caldera Forms: version: 1.9.4, author: Caldera Forms, Auto-updates enabled Caldera Forms Anti Spam: version: 0.4, author: Yoohoo Plugins, Auto-updates enabled CF CiviCRM: version: 1.0.5, author: Andrei Mondoc, Auto-updates enabled CiviCRM: version: 5.40.2, author: CiviCRM LLC, Auto-updates enabled CiviCRM Admin Utilities: version: 0.9, author: Christian Wach, Auto-updates enabled CiviCRM Profile Sync: version: 0.4.1, author: Christian Wach, Auto-updates enabled CiviCRM WordPress Member Sync: version: 0.5.1, author: Christian Wach, Auto-updates enabled Conditional Fields for Contact Form 7: version: 2.0.4, author: Jules Colle, 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 imagick_version: 3.4.4 file_uploads: File uploads is turned off post_max_size: 100M upload_max_filesize: 100M max_effective_size: 100 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 122 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 768 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 1 imagemagick_file_formats: 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: 2.3.0 gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: 9.26 ### wp-server ### server_architecture: Linux 4.15.0-154-generic x86_64 httpd_software: Apache/2.4.48 php_version: 7.4.22 64bit php_sapi: fpm-fcgi max_input_variables: 1000 time_limit: 300 memory_limit: 256M max_input_time: 60 upload_max_filesize: 100M php_post_max_size: 100M curl_version: 7.58.0 OpenSSL/1.1.1 suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: true ### wp-database ### extension: mysqli server_version: 10.4.21-MariaDB-1:10.4.21+maria~bionic client_version: mysqlnd 7.4.22 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /home/bromleysymph/public_html/wp-content WP_PLUGIN_DIR: /home/bromleysymph/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: utf8mb4 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable ### pods ### pods-server-software: Apache/2.4.48 pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 pods-session-save-path: /var/lib/php/sessions pods-session-save-path-exists: Yes pods-session-save-path-writable: Yes pods-session-max-lifetime: 1440 pods-opcode-cache-apc: No pods-opcode-cache-memcached: No pods-opcode-cache-opcache: Yes pods-opcode-cache-redis: No pods-object-cache-apc: No pods-object-cache-apcu: No pods-object-cache-memcache: No pods-object-cache-memcached: Yes pods-object-cache-redis: No pods-memory-current-usage: 77.580M pods-memory-current-usage-real: 86.000M pods-network-wide: No pods-install-location: /home/bromleysymph/public_html/wp-content/plugins/pods/ pods-developer: No pods-tableless-mode: No pods-light-mode: No pods-strict: No pods-allow-deprecated: Yes pods-api-cache: Yes pods-shortcode-allow-evaluate-tags: No ` ```
Pods Package Export I get "Error: Invalid Ajax request" if I go to Pods Admin > Components > Migrate Packages > Export. ```json Copy and paste your Pods Admin > Migrate: Packages > Export and paste the code over this line. ```
philmck commented 3 years ago

Here's a more informative WordPress Environment report (fewer red herrings) taken from a different site with all other plugins disabled, standard theme:

`

wp-core

version: 5.8 site_language: en_GB user_language: en_GB timezone: Europe/London permalink: /%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: open environment_type: production user_count: 47 dotorg_communication: true

wp-paths-sizes

wordpress_path: /home/beechesit/public_html wordpress_size: 62.93 MB (65981719 bytes) uploads_path: /home/beechesit/public_html/wp-content/uploads uploads_size: 123.85 MB (129861117 bytes) themes_path: /home/beechesit/public_html/wp-content/themes themes_size: 4.94 MB (5178972 bytes) plugins_path: /home/beechesit/public_html/wp-content/plugins plugins_size: 377.79 MB (396137399 bytes) database_size: 93.39 MB (97927168 bytes) total_size: 662.89 MB (695086375 bytes)

wp-active-theme

name: Twenty Twenty-One (twentytwentyone) version: 1.4 author: the WordPress team author_website: https://en-gb.wordpress.org/ parent_theme: none theme_features: core-block-patterns, widgets-block-editor, automatic-feed-links, title-tag, post-formats, post-thumbnails, menus, html5, custom-logo, customize-selective-refresh-widgets, wp-block-styles, align-wide, editor-styles, editor-style, editor-font-sizes, custom-background, editor-color-palette, editor-gradient-presets, responsive-embeds, custom-line-height, experimental-link-color, custom-spacing, custom-units, widgets theme_path: /home/beechesit/public_html/wp-content/themes/twentytwentyone auto_update: Enabled

wp-themes-inactive (2)

BeechesTheme: version: 1.0.0, author: Alan Rowe, Auto-updates disabled Twenty Thirteen: version: 3.4, author: the WordPress team, Auto-updates enabled

wp-plugins-active (3)

CF7 Smart Grid Design Extension: version: 4.10.0, author: Aurovrata V., Auto-updates disabled Contact Form 7: version: 5.4.2, author: Takayuki Miyoshi, Auto-updates enabled Pods - Custom Content Types and Fields: version: 2.7.30, author: Pods Framework Team, Auto-updates disabled

wp-plugins-inactive (18)

Akismet Anti-Spam: version: 4.1.10, author: Automattic, Auto-updates enabled Arconix FAQ: version: 1.9.2, author: Tyche Softwares, Auto-updates enabled Beaver Builder Plugin (Lite Version): version: 2.4.2.5, author: The Beaver Builder Team, Auto-updates enabled CiviCRM: version: 5.40.2, author: CiviCRM LLC, Auto-updates enabled CiviCRM Admin Utilities: version: 0.9, author: Christian Wach, Auto-updates enabled CiviCRM Profile Sync: version: 0.4.1, author: Christian Wach, Auto-updates enabled CiviCRM WordPress Member Sync: version: 0.5.1, author: Christian Wach, Auto-updates enabled Flamingo: version: 2.2.2, author: Takayuki Miyoshi, Auto-updates enabled Page Builder by SiteOrigin: version: 2.13.2, author: SiteOrigin, Auto-updates enabled reCaptcha by BestWebSoft: version: 1.64, author: BestWebSoft, Auto-updates enabled SiteOrigin Block Animations: version: 1.0, author: SiteOrigin, Auto-updates enabled SiteOrigin Widgets Bundle: version: 1.23.1, author: SiteOrigin, Auto-updates enabled User Switching: version: 1.5.7, author: John Blackbourn & contributors, Auto-updates enabled W3 Total Cache: version: 2.1.6, author: BoldGrid, Auto-updates enabled WordPress Importer: version: 0.7, author: wordpressdotorg, Auto-updates disabled WP-Matomo Integration: version: 1.0.26, author: André Bräkling, Auto-updates enabled WP Fail2Ban Redux: version: 0.8.2, author: Brandon Allen, Auto-updates enabled WP Google Maps: version: 8.1.14, author: WP Google Maps, 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 imagick_version: 3.4.4 file_uploads: File uploads is turned off post_max_size: 100M upload_max_filesize: 100M max_effective_size: 100 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 122 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 768 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 1 imagemagick_file_formats: 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: 2.3.0 gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: 9.26

wp-server

server_architecture: Linux 4.15.0-154-generic x86_64 httpd_software: Apache/2.4.48 php_version: 7.4.22 64bit php_sapi: fpm-fcgi max_input_variables: 1000 time_limit: 30 memory_limit: 256M max_input_time: 60 upload_max_filesize: 100M php_post_max_size: 100M curl_version: 7.58.0 OpenSSL/1.1.1 suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: true

wp-database

extension: mysqli server_version: 10.4.21-MariaDB-1:10.4.21+maria~bionic client_version: mysqlnd 7.4.22

wp-constants

WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /home/beechesit/public_html/wp-content WP_PLUGIN_DIR: /home/beechesit/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: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8mb4 DB_COLLATE: undefined

wp-filesystem

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

pods

pods-server-software: Apache/2.4.48 pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 pods-session-save-path: /var/lib/php/sessions pods-session-save-path-exists: Yes pods-session-save-path-writable: Yes pods-session-max-lifetime: 1440 pods-opcode-cache-apc: No pods-opcode-cache-memcached: No pods-opcode-cache-opcache: Yes pods-opcode-cache-redis: No pods-object-cache-apc: No pods-object-cache-apcu: No pods-object-cache-memcache: No pods-object-cache-memcached: Yes pods-object-cache-redis: No pods-memory-current-usage: 38.206M pods-memory-current-usage-real: 8.000M pods-network-wide: No pods-install-location: /home/beechesit/public_html/wp-content/plugins/pods/ pods-developer: No pods-tableless-mode: No pods-light-mode: No pods-strict: No pods-allow-deprecated: Yes pods-api-cache: Yes pods-shortcode-allow-evaluate-tags: No

`

philmck commented 3 years ago

Update: On the second site (www.beeches.it), Pods was never used in production so I tried a complete Pods reset - "Clear Pods Cache" then "Reset Pods settings and data" and "Deactivate and Delete Pods data" then re-enabling the Pods plugin. The problem did NOT go away.

Also in case it helps, here is the line 3667 in post.php from the console error above:

<script src='https://www.beeches.it/wp-includes/js/wp-backbone.min.js?ver=5.8' id='wp-backbone-js'></script>

philmck commented 3 years ago

Still failing to find any difference whatsoever between a site that works and one that doesn't. :-(

Seeing slightly different content at post.php:3667 now PodsMn = Backbone.Marionette.noConflict();

Happy to send you anything you request from the debugger.

philmck commented 3 years ago

Possible fix for similar-looking issue here https://wordpress.org/support/topic/backbone-marionette-conflict-wp-4-22/

philmck commented 3 years ago

This is the best description of the issue I've found https://github.com/pods-framework/pods/issues/5354

philmck commented 3 years ago

There is a workaround from the CF7 devs here that works for me https://wordpress.org/support/topic/conflict-with-pods-plugin-2/#post-14804684

sc0ttkclark commented 3 years ago

I’ll work on adjusting the admin script handler to work with the new and improved Pods 2.8 logic that can enqueue only if that screen is for a covered Pod.

sc0ttkclark commented 3 years ago

Issue now entirely solved in 2.8, confirmed with CF7 testing.