Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #223413

    Hi,

    I have a problem with my permalinks on enfold theme.

    I have followed instructions on this link: http://kriesi.at/documentation/enfold/translating-the-portfolio-slug-with-wpml/
    And also rewrite the permalinks, also I’ve deleted the htaccess and rewrite again, nothing works.

    Pages return 404 errors, portfolio post type & home still work.

    • This topic was modified 10 years, 10 months ago by Josue.
    #223415
    This reply has been marked as private.
    #223968

    Sorry but I have to “desactivate WPML” to continue working (it works when I don’t active it. To see the problem, please activate it again.

    #224342

    Hey!

    I fixed it with this code:

    
    add_filter('avf_portfolio_cpt_args','avia_deactivate_portfolio_slug_rewrite', 10, 1);
    function avia_deactivate_portfolio_slug_rewrite($args)
    {
      $args['rewrite'] = false;
      return $args;
    }
    

    I added it into the functions.php file. You can also add it to a plugin or child theme php file if necessary.

    It will deactivate the slug rewrite for portfolio items and then wordpress will process the page permalinks properly. It seems like your server hits a limitation if all post types (pages, portfolio items, posts and other custom post types) register their “pretty” permalink rules and it just stops to process them at a certain point. When I deactivate the pretty permalink for the portfolio post type the “pretty” permalinks at least start to work for the pages.

    Best regards,
    Peter

    #224582

    Dear Peter,

    Thanks for your answer, it’s working yes however I don’t think it’s good for SEO not to have permalinks…

    Any other solution? When we use standard WordPress config & WPML, rewrited permalinks are working.

    Thanks in advance,

    Cyril

    #224820

    Hey!

    Yes because the standard worpress config does not use an additional post type (i.e. the portfolio entries) and thus you won’t reach the limit of rewrite rules. As soon as you add some custom post types the number of rewrite rules increases and your server does not process the rewrite rules for all post types anymore. There’s nothing I can do to fix it from our end (with code). The only solution is to deactivate the “pretty permalinks” for the post type our theme registers and I already provided that code. You might want to contact the server administrator/host – maybe they can tweak the server configuration somehow and change this limit (although I’m not sure which settings need to be changed) or you try to move the website to a different server/host.

    Cheers!
    Peter

    #224990

    Hi Peter,

    Thanks for you answer.

    Hmmm it’s a dedicated server used for all our websites. We produce websites for our customers with many custom post type and this is the first time that we have the problem. This is also the first time that we use enfold theme. Is it related to the enfold theme?

    You don’t have any idea concerning the server config?

    Thanks in advance,

    Cyril

    #225029

    Hi!

    You can try to update to the lates theme version (2.5.2) – maybe it fixes the issue. We changed some things for better WP3.8 compatibility and tmaybe the changes will also fix the rewrite rule issue on your server. I’m only aware of one other user who reported a similar issue with permalinks and there it was definitely no theme issue because other post types (i.e. the “products” post type of WooCommerce) also didn’t work even if the default theme “TwentyThirteen” was activated.

    Best regards,
    Peter

    #226294

    Hello Peter,

    Is there a way to know which version I’m currently using? (in admin or files?)

    #226313

    Peter I can confirm that changing the server didn’t solve the problem.

    #226628

    Hey!

    You’re using 2.5. The latest version is 2.5.2.

    Regards,
    Peter

    #227642

    hi
    I am also facing the permalink / 404 error. Now you suggest to put the code in config.php. But which one?
    BBpress, gravity forms,layerslider,templatebuilder wordpress seo, WPML

    And were can i Put that code? top – bottom??

    #227861

    Hi!

    I recommend to add it to enfold/functions.php – insert it at the very bottom:

    
    add_filter('avf_portfolio_cpt_args','avia_deactivate_portfolio_slug_rewrite', 10, 1);
    function avia_deactivate_portfolio_slug_rewrite($args)
    {
      $args['rewrite'] = false;
      return $args;
    }
    

    but before you try this code follow the instructions here: http://kriesi.at/documentation/enfold/translating-the-portfolio-slug-with-wpml/ and make sure that the slugs are translated properly.

    Regards,
    Peter

    #228278

    Now I have to buy plugins? At least, according to me link which bring me to WPML site?

    #228373

    Hi!

    No, you just need to buy the Multilingual CMS version. It comes with the String Translation extension for free. For a complete overview see: http://wpml.org/purchase/

    Regards,
    Peter

    #228662

    Hi,

    Sorry I got busy, I can confirm that migrating to the last theme version corrected the permalinks problem for me.

    Thanks for you help Peter! see u in an other topic :D

    Cyril

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Permalink error with WPML (404)’ is closed to new replies.