Support » Fixing WordPress » Portfolio and permalink not working as in the stage copy

  • Resolved giemmeeffe

    (@giemmeeffe)


    Hi all.
    I’m the “spare time” webmaster (Mangento based).
    I’m scheduling to convert the website to WordPress, so I did 2 steps:
    1) created a staging website WordPress + Theme Virtue based
    2) importing the staging website in a subdir of the main site

    The website in the subdir is working pretty fine, is using old php and old WordPress because I have to keep the original website alive.

    The problem:
    When I create a Portfolio page in the staging website and I click on it, it goes straight to the related WooCommerce product.
    You can try with the main page with the 6 product present.
    When I do the same in the website in the subdir the link is unable to get the product.

    I tryied with a plugin that rewrite the Portfolio url, removing the “/portfolio” part of the url, but this clash with the WooCommerce url and, instead of having the Portfolio retreiving the product of WooCommerce, is Woocommerce that is unable to show the product anymore.

    .htaccess are the same (except for the presence of the subdir “/wordpress” in the url).

    I’m unable to get the error (I could try an update of the website, but if this don’t fix the issue, I fear I will be unable to rollback the situation).

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • It does sound like your URLs are now mixed up.

    Hopefully, you have a backup of your website and database before you started the change.

    You could then reinstall your original website and database.

    Thread Starter giemmeeffe

    (@giemmeeffe)

    I was able to solve it with many (many!) trial and error.
    The Permalink settings is set as “Post name”, the Product permalink custom base as “/product/” and finally I used the plugin Permalink manager lite to change the permalink of each Portfolio item in “index.php/product/<slug>”. In this way it seems to work. When I click on a portfolio item, it goes straight to the related product using the “slug” in the url.

    Thread Starter giemmeeffe

    (@giemmeeffe)

    Solved.

    Glad to hear you solved the issue !

    Easier said than done:

    Always make sure you have a backup of your website and database !

    Thread Starter giemmeeffe

    (@giemmeeffe)

    Further explanation on what failed moving from one server to the other.
    there was a difference in .htaccess.
    Basically one server had the .htaccess with 2 added lines:

    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

    the lines were added to remove “index.php” to the url of the previous Magento installation.
    Using the previous settings:
    – The Permalink settings is set as “Post name”, the Product permalink custom base as “/product/” and the plugin Permalink manager lite to change the permalink of each Portfolio item in “index.php/product/<slug>” –
    the portfolio url become “index.php/product/<slug>” and the .htaccess rule remove the index.php, so clicking on the portfolio is opened the product.

    Glad to hear you sorted this out.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Portfolio and permalink not working as in the stage copy’ is closed to new replies.