Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPML compatibility #12

Closed
johnraz opened this issue Jun 9, 2011 · 13 comments
Closed

WPML compatibility #12

johnraz opened this issue Jun 9, 2011 · 13 comments

Comments

@johnraz
Copy link

johnraz commented Jun 9, 2011

Just wanted to report that so far in my testing wpml seems to be fully supported.

I don't know if it was on purpose or if it's just a consequence of both side using best practices.
I'm amazed it's working just fine out of the box.

Thanks for the quality work scribu ;-)

@scribu
Copy link
Owner

scribu commented Jun 9, 2011

Thanks for reporting. Hear that, @baden03? :)

@scribu scribu closed this as completed Jun 9, 2011
@baden03
Copy link

baden03 commented Jun 9, 2011

Oh I hear that alright! @johnraz: Which version of the plugin are you using 0.7 or 0.8-alpha? What is the version of WPML you tested this with? Can you confirm that connectable posts in the SAME LANGUAGE are being displayed in the connections search results? Very excited to hear this if it is true!

@johnraz
Copy link
Author

johnraz commented Jun 9, 2011

@baden03:
Well I didn't dig too deep but based on the example provided in the posts2posts doc - looping into loop page, I only had to change the WP_Query to make it look like this:

$connected = new WP_Query( array(
'post_type' => 'acme_testimonial',
'connected_from' => icl_object_id($post->ID)
) );

And everything is working - Only relations made for the active language are displayed.

I'm using posts2posts v0.7 and wpml 2.3.0 on a fresh WP 3.1.3 install with twentyten.

Hope it helps ;-)

@baden03
Copy link

baden03 commented Jun 9, 2011

@johnraz - Thank You for the reply! It seems that the connection issue is NOT with the posts-to-posts plugin, but rather with the older (open-source) version of the WPML plugin. Will upgrade and report back.

@johnraz
Copy link
Author

johnraz commented Jun 9, 2011

@baden03:
You should go and ask wpml's crew to give you a free account to get access to latest releases.
They are very open to such initiative.
I totally dropped the idea of using the opensource version of the plugin, I faced too many bugs and annoyance.

@baden03
Copy link

baden03 commented Jun 9, 2011

@johnraz: I went ahead and shelled out the $80 for the plugin, and yes, everything is working MUCH better. I did notice one area that the p2p plugin could be improved: When setting up the connections, it would be great to define not just the post_type to connect, but at what depth. Only connect posts at level 1: No sub pages, or level 2: Parents and first level children, etc...

But all-in-all it seems that p2p works great with the latest version of WPML! Yay for Jedi master programming skills!

@scribu
Copy link
Owner

scribu commented Jun 9, 2011

You can do that by defining your own box:

https://github.com/scribu/wp-posts-to-posts/wiki/Custom-boxes

@johnraz
Copy link
Author

johnraz commented Jul 30, 2011

Back to the original subject:

It seems that posts2posts doesn't switch the language context when using the "edit translation" button in the side-panel but only when using the top language tool-bar of WPML.

Any idea why ?

@scribu
Copy link
Owner

scribu commented Jul 30, 2011

I suggest you ask that question on the WPML support forums.

I have neither access to the source code of WPML (the commercial version), nor interest in spending time on making posts-to-posts compatible with it.

As I've said previously, I am willing to add actions and filters that would enable WPML (and other plugins) to be compatible with P2P (not the other way around).

@johnraz
Copy link
Author

johnraz commented Jul 30, 2011

Sounds fine to me ;-)

@cubica
Copy link

cubica commented Sep 6, 2011

Check out our new p2p-wpml plugin at https://github.com/cubica/p2p-wpml, it should solve most of the integration issues you reported. Hope that helps, bye!

@scribu
Copy link
Owner

scribu commented Sep 6, 2011

Cool; added to the wiki.

@johnraz
Copy link
Author

johnraz commented Sep 6, 2011

Yeah ! Nice work @cubica , can't wait to test this out ! Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants