Home › Forums › Calendar Products › Events Calendar PRO › Not fully compatible with WPML setting "Languages in directories"
- This topic has 2 replies, 3 voices, and was last updated 9 years, 11 months ago by
Support Droid.
-
AuthorPosts
-
April 25, 2016 at 8:43 am #1106659
Henrik
ParticipantThe WPML setting “Language URL format” has a value called “Different languages in directories” that instead of uses the format http://www.example.com/?lang=en, uses http://www.example.com/en/
The events calendar does not seem to be fully compatible with this setting. This causes the function call “get_permalink” to sometimes return http://www.example.com/en/?lang=en
This is most notable when editing a custom post type in the backend, where the permalink is clearly visible.
This issue also appears in search results URLs.The problem is located in The events calendars Rewrite.php file in the function “filter_post_type_link” that is attached to the filter “post_type_link”
It happens because the search results page and the backend always uses the “?lang=” format (WPML design decision I assume), but this does not mean the the links on these pages should use this format. And therefore the if-statement “if( empty( $_GET[‘lang’] ) )” is not a valid way to determine if a link needs to have the lang attribute.
I can not provide a better solution because I do not understand the purpose of the function since normally WPML should handle this by it self. However if this is related to some events calendar post types, the function should restrict it’s use to those. Or the check “if( empty( $_GET[‘lang’] ) )” should instead access the WPML “Language URL format” option directly.
April 25, 2016 at 8:53 am #1106663George
ParticipantHey Henrik,
Thank you for reaching out.
This and many other features of WPML are unfortunately not fully supported at this time. WPML does many non-standard, idiosyncratic things, and so our code simply is not fully supportive of all of its features at this time.
Our primary commitment is for full compatibility with WordPress Core, and for all WordPress Coding Standards-compliant themes and plugins. WPML is not one of these plugins; it’s a great tool though, so we are working on better compatibility, but it could unfortunately take several months before any progress is made on that front in a way that would include the specific issues you mention here.
Sorry to disappoint! I just wanted to be honest and clear about the nature of things.
Sincerely,
GeorgeMay 10, 2016 at 9:35 am #1112751Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Not fully compatible with WPML setting "Languages in directories"’ is closed to new replies.
