Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26893
    Dan Tonety
    Participant

    Hi there!

    After updating my installation to the last version of WPML (4.0.3) I’ve gotten a broken URL for each event.

    For example, when URL should be something like http://www.mydomain.com/event/event-1
    The permalink appears like this: http://www.mydomain.comevent/event-1

    It has lost the first “/”

    I tried saving again the permalink configuration, but I didn’t get any new result.

    I have installed the last version of WordPress (4.9.6) and the last version of Events Maker (1.6.14)

    Could you give me some help?

    #27745
    Dan Tonety
    Participant

    Any solution?

    #27808
    jannesmannes
    Participant

    I’m having the same issue with the combination of WPML 4.0.5 and Events maker 1.6.14.

    After some debugging I found out the url rewrite in Events maker is seems to cause the issue, but I can’t figure out what exactly.

    Can you provide a fix for this?

    #28424
    jannesmannes
    Participant

    Any solution for this?

    The issue is that WPML changed something in the url structure and removed a trailing slash from the base url of the website. For some reason Events Maker doesn’t add a slash between the base url and the event_rewrite_base slug.

    #29367
    FlexZa
    Participant

    I solved the issue above by editing the handler that is responsible for rewriting the permalinks in relation to WPML.

    This is done by editing the file ‘translate-rewrite-slugs.php’ located in the ‘/includes/libraries/’ subdirectory of the plugin-folder.

    On line 263 I added the missing slash after the home_url which results in the following edited line:
    $post_link = esc_url( icl_get_home_url() . '/' . $this->post_types[$post->post_type]->translated_slugs[$lang]->rewrite['slug'] . '/' . ( $leavename ? "%$post->post_type%" : $post->post_name ) );

    After this you have to re-save the permalinks in the plugin settings (most right tab), followed by flushing your site permalinks.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.