sewpafly / post-thumbnail-editor

Wordpress Plugin to manually edit post thumbnails
http://wordpress.org/extend/plugins/post-thumbnail-editor/
32 stars 18 forks source link

Conflict with WPML Translation Management #38

Closed klevain closed 12 years ago

klevain commented 12 years ago

Hi ! I've encounter trouble using your excelent pte and the wpml Translation Management plugin.

If the wpml plugin is disabled pte works perfectly. If the wpml plugin is active, the plugin seems loading infinitly. All the images seems to be there but they are covered by the loader.

Any thoughts ?

On wordpress 3.3.

sewpafly commented 12 years ago

Did you mean this one: http://wpml.org/ - That one isn't free and I can't test against it. Without testing, I imagine that their plugin is actually causing the problem by loading itself even when ajax pages are being served. This means that they are injecting code into the page that PTE creates.

naiad03 commented 12 years ago

Hi brent, I sent you an email for the same problem with WPML, if you want I can send you a zip version of my files. Nadia.

sewpafly commented 12 years ago

naiad03, if you can get me a zip version, I will take a look at it.

naiad03 commented 12 years ago

Ok i did it, thanks for you reply!

sewpafly commented 12 years ago

I fixed this problem by changing one line in sitepress.class.php (the js_load function ~line 1900)

if(is_admin()){

to

if(is_admin() && !defined('DOING_AJAX')){

Maybe this gist would illustrate it better.

klevain commented 12 years ago

@Sewpafly, I understand you're surprise. But they got a program for plugin and theme designers : http://wpml.org/documentation/theme-compatibility/go-global-program/

Besides the compatibility with the wpml plugin, it can make your plugin a bit more clean. Could you take a look ?

I can also give you a temp access to the wordpress files and admin part.

sewpafly commented 12 years ago

@vonwa, from what I can see that program really just helps you put in the translation hooks. Have you seen any issues where the translation wasn't working well with PTE? I believe that every bit of user facing text is using the gettext calls already.

mbernasocchi commented 12 years ago

sewpafly there is a GPL fork here: http://wordpress.org/extend/plugins/wp-i18n/

mbernasocchi commented 12 years ago

version 1.0.6 alpha solves this problem as well. thanks

sewpafly commented 12 years ago

@mbernasocchi - Thanks!