24/7 Support - 800.608.6482

Miva Merchant Community Forums

Page 1 of 2 1 2 LastLast

Thread: short links not working for category tree and products.

  1. #1
    Join Date
    Apr 2007
    Location
    nj
    Posts
    68

    Default short links not working for category tree and products.

    Website was working ok until I was hacked.
    That problems was solved but I now have linking problem which may or may not be related to the hacking.

    I'm using Weiland short link mod.

    - Search for products works ok. I click on a product in the search result and I go to the product and the short link displays in the address bar.

    - PLST works ok. When I click on a product link I go to the product and the short link displays in the address bar.

    BUT: when I click on my category tree links I get the following message - " Page 'Chinese_Herbal_Teas' no longer exists." ????

    Here is my htaccess file:

    ### Begin - Inserted by Miva Merchant

    DirectoryIndex /Merchant2/merchant.mvc?Screen=SFNT

    RewriteEngine On

    RewriteRule ^Merchant2/admin.mvc? - [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^product/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Product_code=$1 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^category/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=CTGY&Category_code=$1 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^([^/]+)/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Category_code=$1&Product_ code=$2 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^([^/.]+).html$ /Merchant2/merchant.mvc?Screen=$1 [QSA,L]

    ### End - Inserted by Miva Merchant

    ************************************************** *********

    Here is my CTGY page "Category Tree Template" file:

    <div id="category-tree">
    <mvt:foreach array="cattree_categories" iterator="cattree_category">
    <mvt:if expr="l.settings:cattree_category:code EQ g.Category_Code">
    <div class="level-&mvte:cattree_category:level; active">
    <mvt:else>
    <div class="level-&mvte:cattree_category:level;">
    </mvt:if>


    <a href="http://www.healingherbs.net/&mvta:cattree_category:code;.html">

    <mvt:if expr="l.settings:cattree_category:image">
    <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" />
    <mvt:else>
    &mvte:cattree_category:name;
    </mvt:if>
    </a>
    </div>
    </mvt:foreach>
    </div>
    **********************************************8

    Any suggestions??? Please.

  2. #2
    Join Date
    Sep 2006
    Posts
    2,498

    Default Re: short links not working for category tree and products.

    Your missing /category and /product in the short link url structures:

    <a href="http://www.healingherbs.net/category/&mvta:cattree_category:code;.html">

    <a href="http://www.healingherbs.net/product/&mvta:product:code;.html">
    Dan - Glendale Designs
    http://www.glendaledesigns.com
    sales@glendaledesigns.com
    623-322-6066

  3. #3
    Join Date
    Apr 2007
    Location
    nj
    Posts
    68

    Default Re: short links not working for category tree and products.

    Thanks for replying.

    I added both lines and I get the same error message "Page 'Classic_Herbal_Formulas' no longer exists."

    Here is the file now:
    --------------------------------------

    <div id="category-tree">
    <mvt:foreach array="cattree_categories" iterator="cattree_category">
    <mvt:if expr="l.settings:cattree_category:code EQ g.Category_Code">
    <div class="level-&mvte:cattree_category:level; active">
    <mvt:else>
    <div class="level-&mvte:cattree_category:level;">
    </mvt:if>


    <a href="http://www.healingherbs.net/category/&mvta:cattree_category:code;.html">

    <a href="http://www.healingherbs.net/product/&mvta:product:code;.html">

    <a href="http://www.healingherbs.net/&mvta:cattree_category:code;.html">

    <mvt:if expr="l.settings:cattree_category:image">
    <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" />
    <mvt:else>
    &mvte:cattree_category:name;
    </mvt:if>
    </a>
    </div>
    </mvt:foreach>
    </div>

  4. #4
    Join Date
    Sep 2006
    Posts
    2,498

    Default Re: short links not working for category tree and products.

    This is the only line needed for the category tree:
    <a href="http://www.healingherbs.net/category/&mvta:cattree_category:code;.html">

    Do you have anything else in your .htaccess file? In re-reading your initial post, you stated you are using the Emporium Plus short link mod, however the rewrites shown are for the stock Miva Merchant short links. I suspect you have conflicting rewrites if both are in place.
    Dan - Glendale Designs
    http://www.glendaledesigns.com
    sales@glendaledesigns.com
    623-322-6066

  5. #5
    Join Date
    Nov 2006
    Location
    Groton Vermont
    Posts
    1,929

    Default Re: short links not working for category tree and products.

    Quote Originally Posted by herbchina View Post
    Thanks for replying.

    I added both lines and I get the same error message "Page 'Classic_Herbal_Formulas' no longer exists."

    Here is the file now:
    --------------------------------------

    <div id="category-tree">
    <mvt:foreach array="cattree_categories" iterator="cattree_category">
    <mvt:if expr="l.settings:cattree_category:code EQ g.Category_Code">
    <div class="level-&mvte:cattree_category:level; active">
    <mvt:else>
    <div class="level-&mvte:cattree_category:level;">
    </mvt:if>


    <a href="http://www.healingherbs.net/category/&mvta:cattree_category:code;.html">

    <a href="http://www.healingherbs.net/product/&mvta:product:code;.html">

    <a href="http://www.healingherbs.net/&mvta:cattree_category:code;.html">

    <mvt:if expr="l.settings:cattree_category:image">
    <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" />
    <mvt:else>
    &mvte:cattree_category:name;
    </mvt:if>
    </a>
    </div>
    </mvt:foreach>
    </div>
    This all depends on how you have the identifiers set up so it looks like you have CTGY for categories
    http://www.healingherbs.net/CTGY/Her...um_Flower.html

    and PROD for products
    http://www.healingherbs.net/PROD/4970.html

    You will need to adjust the ctgy tree code and links accordingly or simply change the identifiers - which are set on the SEO tab of Domain settings.

    Make sure you also implement the canonical tags for your pages.
    Last edited by Mark Hood; 01-03-13 at 10:10 AM.

  6. #6
    Join Date
    Sep 2006
    Posts
    2,498

    Default Re: short links not working for category tree and products.

    Mark,

    Look at the rewrite example provided, they are using /product and /category. I suspect we are not seeing the full .htaccess as those are stock Miva Merchant rewrites and he stated that the Emporium Plus module was in use.

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^product/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Product_code=$1 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^category/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=CTGY&Category_code=$1 [QSA,L]
    /CTGY and /PROD fire an Internal Server error. Need to see the full .htaccess and determine what the ultimate url structure should be.
    Last edited by Dan - Glendale Designs; 01-03-13 at 10:17 AM.
    Dan - Glendale Designs
    http://www.glendaledesigns.com
    sales@glendaledesigns.com
    623-322-6066

  7. #7
    Join Date
    Apr 2007
    Location
    nj
    Posts
    68

    Default Re: short links not working for category tree and products.

    Thank you both. You hit the nail on the head. Everything is working now on this website. Now I'll work on my ohter website with similar problem.

    Thanks, again.

  8. #8
    Join Date
    Apr 2007
    Location
    nj
    Posts
    68

    Default Re: short links not working for category tree and products.

    I'm back and working on my second website with a similar problem.

    - Search Option (Long address url ) displays product list and clicking on product takes me to the product screen. - NO PROBLEM HERE.

    - Product List (Option (Long address URL) displays a product listing. Clicking on a product code result in blank page w/message "Page '3703' no longer exists." URL is " http://www.healingherbsofchina.com/3703.html" - WHY???

    - Category Tree - Clicking on a category results in a blank page w/ message "Page 'Chinese_Herbal_Teas' no longer exists. " and the URL is short - http://www.healingherbsofchina.com/C...rbal_Teas.html - PROBLEM!!!

    Here is my htaccess file:


    DirectoryIndex /Merchant2/merchant.mvc

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !-s
    RewriteRule ^page/(.*) /Merchant2/merchant.mvc?page=$1
    RewriteBase /
    RewriteRule ^(.*)\.mv$ $1 [C,E=WasMV:yes]
    RewriteCond %{REQUEST_FILENAME}.mvc -f
    RewriteRule ^(.*)$ $1.mvc [S=1]
    RewriteCond %{ENV:WasMV} ^yes$
    RewriteRule ^(.*)$ $1.mv

    ### -------------------------------------------------


    ### Begin - Inserted by Miva Merchant

    DirectoryIndex /Merchant2/merchant.mvc?Screen=SFNT

    RewriteEngine On

    RewriteRule ^Merchant2/admin.mvc? - [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^product/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Product_code=$1 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^category/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=CTGY&Category_code=$1 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^([^/]+)/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Category_code=$1&Product_ code=$2 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^([^/.]+).html$ /Merchant2/merchant.mvc?Screen=$1 [QSA,L]

    ### End - Inserted by Miva Merchant

    -----------------------------------------------------------
    Here is my Cegory Tree Template file:

    <mvt:if expr="l.settings:cattree:stack EQ 0">
    <mvt:item name="category_tree" param="cattree_header" />
    </mvt:if>
    <mvt:if expr="l.settings:nextcount GT 0">
    <table border=0 cellpadding="0" cellspacing="0">
    <tr>
    <mvt:if expr="l.settings:cattree:stack GT 0">
    <td width="1%"><img src="graphics/en-US/admin/blank.gif" height="1" width="8" border=0></td>
    </mvt:if>

    <td nowrap>
    <a href="&mvt:global:sessionurl;Screen=BASK&Store_Cod e=&mvt:global:Store_Code;">

    <br>

    <mvt:item name="category_tree" param="nextlevel">
    <mvt:foreach iterator="cattree_category" array="categories">

    <font face="Arial, Helvetica" size="-1" color="green">

    <mvt:if expr="l.settings:cattree_category:code EQ g.Category_code">
    <mvt:if expr="NOT l.settings:cattree_category:image">
    <b>&mvt:cattree_category:name;</b>
    <mvt:else>
    <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" border=0>
    </mvt:if>
    <mvt:else>
    <mvt:if expr="l.settings:cattree_category:image">
    <a href="&mvt:global:sessionurl;Screen=CTGY&Store_Cod e=&mvta:store:code;&Category_Code=&mvta:cattree_ca tegory:code;"><img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" border=0></a>
    <mvt:else>


    <a href="http://www.healingherbsofchina.com/&mvta:cattree_category:code;.html">&mvt:cattree_ca tegory:name;</a>



    </mvt:if>
    </mvt:if>
    </font>
    <br>
    <mvt:if expr="l.settings:cattree_category:id EQ l.settings:cattreenext">
    <mvt:item name="category_tree"/>
    </mvt:if>
    </mvt:foreach>
    </mvt:item>
    </td></tr>
    </table>
    </mvt:if>
    <mvt:if expr="l.settings:cattree:stack EQ 0">
    <mvt:item name="category_tree" param="cattree_footer" />
    </mvt:if>
    --------------------------------------------------------

    HELP ANYONE?? PLEASE

  9. #9
    Join Date
    Sep 2006
    Posts
    2,498

    Default Re: short links not working for category tree and products.

    Same thing, the rewrites you have in place are looking for /category and /product:
    http://www.healingherbsofchina.com/c..._Formulas.html

    This is determined by these two lines implemented by the stock Miva Merchant short link functionality within the .htacess file:

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^product/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Product_code=$1 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^category/
    ([^/.]+).html$ /Merchant2/merchant.mvc?Screen=CTGY&Category_code=$1 [QSA,L]

    That said, are you changing your existing url structure? If so, it may be necessary to implement 301 redirects from the old structure to the new in order to maintain any existing search engine rankings as much as possible.
    Last edited by Dan - Glendale Designs; 01-03-13 at 05:27 PM.
    Dan - Glendale Designs
    http://www.glendaledesigns.com
    sales@glendaledesigns.com
    623-322-6066

  10. #10
    Join Date
    Apr 2007
    Location
    nj
    Posts
    68

    Default Re: short links not working for category tree and products.

    Thanks,
    Domain settings is using "product" & "category".

    I just spotted an error in the category tree file and everything is ok with the Category tree links. They now take me to the category product listing display.

    BUT When I click on a product I still get an error message "Page '3703' no longer exists" (3703 is a product code.)

    Which file is the problem in - .
    Category Product List Layout or Product Display Layout??

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •