google-code-export / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
2 stars 1 forks source link

WPML 3.1.9 & CCTM collide on page editing making the page non-editable #583

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please make sure you are including enough information to make this a valid
bug report: https://code.google.com/p/wordpress-custom-content-type-
manager/wiki/ReportingBugs

What steps will reproduce the problem? (Be *specific*)
1. Try to edit page (a translatable type by WPML)

What is the expected output?
See all the fields, title, content, meta...

What do you see instead?
, but I see title only

check out this thread 
https://wpml.org/forums/topic/version-3-1-9-not-compatible-with-cctm-plugin-page
s-cannot-be-edited/

turning off or or the other plugin "solves" the problem
the result ends with the 
wordpress/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on 
line 3987
I think the WPML try to do something on same thing as CCTM does and it turns 
out in to Maximum execution time error. (Only in WP debug mode: true, no other 
error is on the site what so ever.)

I'm expecting the problem only on one site from many, so I guess I use one 
concrete thing custom_meta or something on this website that makes the problem. 
(drop down menu, text field)

*SYSTEM INFO* 
------------------------ 
Plugin Version: 0.9.7.13-pl
WordPress Version: 4.1.1
PHP Version: 5.4.36-0+deb7u3
MySQL Version: 5.5.41-0+wheezy1
Server OS: Linux
Language: 
------------------------ 
ACTIVE PLUGINS: 
 * JSON to mobile app v.0.1 [http://2046.cz]
 * AJAX Read More v.2.1.1 [http://sergey-s-betke.blogs.novgaro.ru/category/web/wordpress/read-more/]
 * Admin Columns v.2.3.5 [http://www.admincolumns.com]
 * Convert Post Types v.1.4 [http://stephanieleary.com/plugins/convert-post-types]
 * Custom Content Type Manager : Advanced Custom Post Types v.0.9.7.13 [http://code.google.com/p/wordpress-custom-content-type-manager/]
 * FitVids for WordPress v.2.1 [http://wordpress.org/extend/plugins/fitvids-for-wordpress/]
 * Force Regenerate Thumbnails v.2.0.3 [http://pedroelsner.com/2012/08/forcando-a-atualizacao-de-thumbnails-no-wordpress]
 * Geo Mashup v.1.8.3 [http://code.google.com/p/wordpress-geo-mashup/]
 * iframe v.2.9 [http://wordpress.org/plugins/iframe/]
 * Post Type Switcher v.1.5 [http://wordpress.org/extend/post-type-switcher/]
 * Posts 2 Posts v.1.6.3 [http://scribu.net/wordpress/posts-to-posts]
 * Regenerate Thumbnails v.2.2.4 [http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/]
 * Simple Image Sizes v.3.0.1 [https://github.com/Rahe/'simple-image-sizes']
 * Simple Page Ordering v.2.2.4 [http://10up.com/plugins/simple-page-ordering-wordpress/]
 * WPML Multilingual CMS v.3.1.9 [https://wpml.org/]
 * Theme Test Drive v.2.9 [http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive]
 * W3 Total Cache v.0.9.4.1 [http://www.w3-edge.com/wordpress-plugins/w3-total-cache/]
 * WP Migrate DB v.0.6.1 [http://wordpress.org/plugins/wp-migrate-db/]
 * WP-PageNavi v.2.87 [http://lesterchan.net/portfolio/programming/php/]
------------------------ 
CURRENT THEME: easy_1.3 v.1.3 
Does the problem continue if you disable all other plugins? (plugin
conflicts cause a LOT of problems, so please isolate the problem)

Please copy and paste the system information that appears in a yellow
textarea when you click on "Report a Bug" on any CCTM admin screen (this
includes the version of the
plugin, the version of PHP, the version of MySQL, a list of other active
plugins etc.):

Original issue reported on code.google.com by 2...@emblem.cc on 10 Mar 2015 at 7:53

GoogleCodeExporter commented 9 years ago
This one is tricky: plugin collision is impossible to prevent on WordPress due 
to its architectural limitations, and I can't debug WPML without purchasing it. 
 If you can upload the sitepress-multilingual-cms/sitepress.class.php file here 
I can look at it in more depth. 

If no errors are being logged, I would suspect that "@" is being used to 
suppress errors.  I really try to avoid that technique because it's an opaque 
way to ignore problems.

Original comment by ever...@fireproofsocks.com on 10 Mar 2015 at 8:28

GoogleCodeExporter commented 9 years ago
I have send it to you WPML via wetransefer

Original comment by 2...@emblem.cc on 10 Mar 2015 at 8:41

GoogleCodeExporter commented 9 years ago
The problem (in my opinion) is in the WPML file: there's an uncheck do/while 
loop there and the condition that causes the loop to exit is never met.  Here's 
the relevant code from lines 3984 - 3993:

if ( $existing_post_name || $this->is_bad_slug( $slug, $post_type, $post_parent ) ) { $suffix = 2; do { $post_name_check_args[ 'post_name' ] = substr( $slug, 0, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix"; $post_name_check_prepare = $wpdb->prepare( $post_name_check_query, array_values( $post_name_check_args ) ); $existing_post_name = $wpdb->get_var( $post_name_check_prepare ); $suffix ++; } while ( $existing_post_name ); $slug = $post_name_check_args[ 'post_name' ]; }


So that's an issue that WPML should resolve.  There are not standards in how WP 
handles some of the stuff around custom post-types -- even in the WP core, 
there are bugs, inconsistencies and things have been changing with each 
release, so it's not really an argument where you can say that the CCTM or WPML 
is handling them the right or wrong way... so the only logical thing to do in 
my opinion is to adjust the run-away code.  Don't build a loop that can get 
stuck.  At a minimum it needs to include a way to fail gracefully, e.g. by 
setting a number of max iterations.

Going a step further would mean more carefully looking at what the possible 
post names are, and adjust the code to look for that more effectively -- 
granted this is difficult when the WordPress API is so limited, but that's 
what's needed here.

Original comment by ever...@fireproofsocks.com on 10 Mar 2015 at 9:02

GoogleCodeExporter commented 9 years ago
Thanks a lot.. hope WPML will do something about it and give you credits at 
least..
Is there any way how to refund your time?

Original comment by 2...@emblem.cc on 10 Mar 2015 at 9:12

GoogleCodeExporter commented 9 years ago
You should file an updated bug report/feature-request with WPML: I cannot file 
this because I don't have an account.

Donations are cheerfully accepted at 
https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=1Apw7uu6Syt_ly0IQB8J_
NGmaTdNR5tEhhBzqXVaQ4gxTPZyoi7MAnXhgWa&dispatch=5885d80a13c0db1f8e263663d3faee8d
e62a88b92df045c56447d40d60b23a7c

Original comment by ever...@fireproofsocks.com on 10 Mar 2015 at 9:18

GoogleCodeExporter commented 9 years ago
hey.. the bug is reported.
thanks 

Original comment by 2...@emblem.cc on 10 Mar 2015 at 9:34

GoogleCodeExporter commented 9 years ago
the paypal link doesn't work.. is your email the key where to send some thanks?

Original comment by 2...@emblem.cc on 10 Mar 2015 at 9:41

GoogleCodeExporter commented 9 years ago
Try this: 
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FABHDKPU7P6
LN

Original comment by ever...@fireproofsocks.com on 10 Mar 2015 at 9:52