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.06k stars 266 forks source link

When editing a Pods CPT, updating it and then leaving the page, the unsaved content alert pops up #5933

Closed lhberg closed 3 years ago

lhberg commented 3 years ago

Issue Overview

After the Wordpress 5.6.1 update when editing a Pods CPT, updating it an then leaving the page, the unsaved content alert pops up. Same when not editing anything, just open the post and closing it again. Btw. same with CPT UI.

Expected Behavior

The alert should only pop up when there is unsaved content at all.

Current Behavior

See issue overview

Steps to Reproduce (for bugs)

  1. See issue overview

Possible Solution

WordPress Environment

``` Copy and paste your System Details from **Pods Admin > Settings > Debug Information** in WordPress admin here. WordPress Version: 5.6.1 PHP Version: 7.4.14 MySQL Version: 5.5.5 Server Software: Apache Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:85.0) Gecko/20100101 Firefox/85.0 Session Save Path: /var/cache/php-sessions Session Save Path Exists: Yes Session Save Path Writeable: Yes Session Max Lifetime: 1440 Opcode Cache: Apc: No Memcached: No OPcache: Yes Redis: No Object Cache: APC: No APCu: Yes Memcache: No Memcached: No Redis: No WPDB Prefix: wppr_ WP Multisite Mode: No WP Memory Limit: 512M Current Memory Usage: 137,384M Current Memory Usage (real): 16,000M Pods Network-Wide Activated: No Pods Install Location: /home/huggenbe/www/sandbox.d-tales.xyz/wp-content/plugins/pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: Beaver Builder Child Theme Currently Active Plugins: AddToAny Share Buttons: 1.7.43 Admin Columns Pro: 5.4.2 Admin Columns Pro - Pods: 1.5.1 Adminimize: 1.11.7 Admin Menu Editor Pro: 2.13 Advanced Editor Tools (previously TinyMCE Advanced): 5.6.0 Backup and Staging by WP Time Capsule: 1.21.28 Beaver Builder Code Settings: 0.1 Beaver Builder Plugin (Pro Version): 2.4.2 Beaver Themer: 1.3.2.3 Classic Editor: 1.6 Cookie Notice & Compliance for GDPR / CCPA: 2.0.2 Disable Comments: 2.1.0 Duplicator: 1.3.40.1 Easy Updates Manager: 9.0.7 Enable Media Replace: 3.5.0 Gravity Forms: 2.4.22 Gravity Forms Advanced Post Creation Add-On: 1.0-beta-7 HappyFiles Pro: 1.5.1 Head, Footer and Post Injections: 3.2.1 Imsanity: 2.7.1 iThemes Security Pro: 6.8.3 Loco Translate: 2.5.0 Maintenance: 4.0 MainWP Child Reports: 2.0.7 Pods - Custom Content Types and Fields: 2.7.26 Pods Beaver Themer Add-On: 1.3.6 PowerPack for Beaver Builder: 2.13.4 Say What? Pro: 3.0.1 Simple 301 Redirects: 1.07 Smart Settings UI: 1.1.5 Swift Performance: 2.2.3 TablePress: 1.12 Themer Templates for Beaver Themer: 1.3 Timed Content for Beaver Builder: 1.0.2 Toolbox for Beaver Builder: 1.1.5 Ultimate Addons for Beaver Builder: 1.29.0 UpdraftPlus - Backup/Restore: 1.16.47 User Role Editor: 4.58.2 WordPress Importer: 0.7 WP-ServerInfo: 1.66 WP-UserOnline: 2.87.5 WP Admin Pages PRO: 1.8.4 WP Dark Mode: 1.3.6 WP Dashboard Notes: 1.0.10 WP STAGING: 2.8.0 WP Statistics: 13.0.5 Yoast Duplicate Post: 4.1.1 ```

Pods Package Export (helpful!)

Copy and Paste the JSON Export from **Pods Admin, Migrate: Packages, Export** in WordPress admin here
{"meta":{"version":"2.7.26","build":1612792602},"pods":{"133":{"id":133,"name":"pods-cpt","label":"Pods-CPTs","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Pods-CPT","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"pods-cpt","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"0","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_bp-themer-templates-singular":"0","built_in_taxonomies_category":"0","built_in_taxonomies_fl-builder-template-category":"0","built_in_taxonomies_fl-builder-template-type":"0","built_in_taxonomies_happyfiles_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","menu_position":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_excerpt","pfat_run_outside_loop":"0","rest_enable":"0","read_all":"0","write_all":"0"},"50":{"id":50,"name":"tech_doc","label":"Tech Doc","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Tech Doc","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"tech_doc","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"0","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"0","built_in_taxonomies_fl-builder-template-category":"0","built_in_taxonomies_fl-builder-template-type":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_wpforms_log_type":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"51":{"id":51,"name":"user_manual","label":"User Manual","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"User Manual","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"user_manual","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"0","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"0","built_in_taxonomies_fl-builder-template-category":"0","built_in_taxonomies_fl-builder-template-type":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_wpforms_log_type":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"}}}

Workaround or Alternate Solution Until Bug is Addressed

Related Issues and/or PRs

jimtrue commented 3 years ago

Can validate that behavior 5.6.1 with Classic Editor; not seeing this with the Block Editor.

lhberg commented 3 years ago

confirmed.

mpbrunelle commented 3 years ago

I have the same problem.

I have a CPT containing:

I have another CPT containing only 1 bidirectional relationship field. In this CPT, when I click on Save Draft, I get the same alert. If I click Cancel, the "wheel" keeps turning forever. I have to leave the page and start over.

I don't use the editor (block or classic) in either of these CPT.

jimtrue commented 3 years ago

@mpbrunelle You have to be using either Classic Editor or Block Editor on the back-end of WordPress on the editing screen for the post. Those are the only two areas where you'd be able to edit the Pods fields on the back-end which is what this issue is in relation to. If you're using a Page Builder, we don't control those screens.

jimtrue commented 3 years ago

@mpbrunelle In addition, this is specifically an issue where Chrome or Browser is assuming an 'edit' when there is no edit, ie just opening the post edit screen and making no changes. Save Draft/Cancel should have nothing to do with this.

mpbrunelle commented 3 years ago

@jimtrue Thank you for your answer. I am not using a page builder. I enter data directly in each custom post. If the problem is not related to this bug report, there is still something going wrong on 'save'. I have managed to make it work by first publishing the custom post and then adding items to the relationship fields. So I guess that something was wrong when I was saving the draft. Do you know where the problem could be?

jimtrue commented 3 years ago

@mpbrunelle you're welcome to open another bug report, but your issue doesn't sound like this one. You may have other configuration settings with your relationship (ie required fields) that might be causing that issue.

mpbrunelle commented 3 years ago

@jimtrue Thank you. I'll keep testing and open another bug report if necessary. Have a nice day.

quasel commented 3 years ago

That's a wordpress Core issue - https://core.trac.wordpress.org/ticket/52440 - affects Pages, CPT and more…

lhberg commented 3 years ago

Despite WP says they fixed the bug with 5.6.2 I still see it.

JoryHogeveen commented 3 years ago

Hi @lhberg Please check if the problem is resolved when Pods is deactivated.

lhberg commented 3 years ago

Hi Jory,

Thanks for your message.

I think that the issue was due to an incompatibility with another plugin. I installed some updates and now it’s gone.

Best,

Lukas

Am 25.02.2021 um 14:58 schrieb Jory Hogeveen notifications@github.com:

Hi @lhberg https://github.com/lhberg Please check if the problem is resolved when Pods is deactivated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pods-framework/pods/issues/5933#issuecomment-785914036, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOCXA52MV7D7PTX3DOS6TLTAZJPJANCNFSM4XJBO7TA.