Thread: Zenid issue

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jun 2010
    Posts
    207
    Plugin Contributions
    1

    Default Zenid issue

    Hello,

    Here's a link to the site in question: http://tinyurl.com/cp3t8ww

    If you then click on the "Relish" link , you will likely have a zenid appended to the url with an ampersand (website.com/relish&zenid=blahblahblah). Unfortunately, this gives you a Page Not Found error message. If you then click the "Relish" link again (or any other link), the page loads correctly and no zenid shows up in the URL (since the zenid is set at that point, I am assuming).

    If you go to the home page in a different browser and then click on the "Upcoming Shows and Markets" link, you will see the zenid appended to the url with a question mark. When you click this, it loads up the next page just fine.

    The difference between those two pages is that the Upcoming Shows page is a simple EZ page, and the Relish link is an EZ Page that links to the internal URL "relish", which is the URL assigned to the Relish category via CEON URI Mapping.

    I emailed the CEON developer, and he said that it isn't an issue with Ceon URI Mapping, it that his module doesn't make the mistake of appending an ampersand instead of a question mark. He said I should check the menu module being used, but it is simply the stock Zen Cart menu.

    Any ideas on how to fix this issue?

    Thanks!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Zenid issue

    Selecting the Relish link does not generate a 404 error for me
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Zenid issue

    I did get a Page Not Found the first time I clicked the Relish link. It worked correctly the second time.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Zenid issue

    I find this happens on first click of all your pages ...

    Try turning off the SEO/rewrites and see if that clears up this problem ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Oct 2008
    Posts
    19
    Plugin Contributions
    0

    Default Re: Zenid issue

    I notice that error occours because the url is http://sunshinefoodco.com/relish&zenid=ss0a6lap50cn4l9vtpdl4ssjo5 in spite of http://sunshinefoodco.com/relish?zenid=ss0a6lap50cn4l9vtpdl4ssjo5

    I hope it's useful for you...
    I'm having the same problem but i can't solve ... at the moment!!

  6. #6
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Zenid issue

    Quote Originally Posted by ligrex View Post
    I notice that error occours because the url is http://sunshinefoodco.com/relish&zenid=ss0a6lap50cn4l9vtpdl4ssjo5 (instead) of http://sunshinefoodco.com/relish?zenid=ss0a6lap50cn4l9vtpdl4ssjo5
    I'm going to go out on a limb and guess this behavior only appears on EZ-Page links using the "Internal URL" field to point to a category or product. This is a common problem encountered due to the way EZ-Pages handle the "Internal URL" or "alt_url" field. Basically it passes the entire contents of this field to zen_href_link as the "page" with no parameters instead of correctly reading the page and splitting off the parameters.

    There are a couple workarounds:
    1. Configure Zen Cart to use "Cookie Domain" and "Force Cookie Use". These settings can be changed from "admin" -> "configuration" -> "sessions". In my experience, once these settings are enabled only users who have disabled cookies will ever see the zenid in the URL.
    2. Use a full URL in the "External URL" including the "http://".
    3. Use zen_href_link directly in your templates instead of using the EZ-Page header, footer, and sidebox.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  7. #7
    Join Date
    Aug 2004
    Location
    Belfast, Northern Ireland
    Posts
    2,480
    Plugin Contributions
    14

    Default Re: Zenid issue

    Hi,

    Quote Originally Posted by lhungil View Post
    I'm going to go out on a limb and guess this behavior only appears on EZ-Page links using the "Internal URL" field to point to a category or product.
    That's exactly what is happening.

    Quote Originally Posted by lhungil View Post
    There are a couple workarounds:
    1. Use zen_href_link directly in your templates instead of using the EZ-Page header, footer, and sidebox.
    That is also my recommendation.. the site was built using dynamic Zen Cart URIs but now it has moved across to using static URIs the EZ-Page internal URI functionality is no longer "appropriate" and I recommend changing to using zen_href_link. If Zen Cart had originally been built to use static URIs then this would already have been the case I'd imagine and this problem wouldn't have appeared. The solution is easy as you point out. :)

    All the best..

    Conor
    ceon

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Zenid issue

    Quote Originally Posted by lhungil View Post
    This is a common problem encountered due to the way EZ-Pages handle the "Internal URL" or "alt_url" field. Basically it passes the entire contents of this field to zen_href_link as the "page" with no parameters instead of correctly reading the page and splitting off the parameters.
    "correctly reading"? Can you explain what you mean?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Aug 2004
    Location
    Belfast, Northern Ireland
    Posts
    2,480
    Plugin Contributions
    14

    Default Re: Zenid issue

    Hi,

    Quote Originally Posted by DrByte View Post
    "correctly reading"? Can you explain what you mean?
    Actually, what I've said is wrong.. the problem isn't that the links aren't using zen_href_link, it's that a "feature" of zen_href_link() is that it can't cope with URIs that are static but don't have parameters.

    In the modules/ezpages_bar_header.php file code like the following is used:

    PHP Code:
    zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' 'NONSSL' 'SSL'), truetruetrue
    For this to work properly the zen_href_link() function requires that a parameter list is supplied, in which case the URI has a "first" parameter with a question mark prepended. The session ID is always appended using an ampersand because of the code:

    PHP Code:
    $separator '&'
    In Ceon URI Mapping I made it so that no such thing could happen. Sorry, should have also got in touch to have this "feature" fixed for Zen Cart itself. Code from Ceon URI Mapping which can be an easy basis for making the same changes to the zen_href_link function:

    PHP Code:
    if (strlen($parameters) > 0) {
                    
    // Must add the parameters to the link
                    
    $link .= '?';
                    
                    while (
    substr($parameters01) == '?' || substr($parameters01) == '&') {
                        
    $parameters substr($parameters1strlen($parameters) - 1);
                    }
                    
                    
    $link .= zen_output_string($parameters);
                    
                    
    $separator '&';
                } else {
                    
    $separator '?';
                } 
    Hope that helps!

    All the best...

    Conor
    ceon

  10. #10
    Join Date
    Aug 2004
    Location
    Belfast, Northern Ireland
    Posts
    2,480
    Plugin Contributions
    14

    Default Re: Zenid issue

    Hi,

    Suppose I may as well make things easy :)

    This code:

    PHP Code:
    if (!$static) {
          if (
    zen_not_null($parameters)) {
            
    $link .= 'index.php?main_page='$page "&" zen_output_string($parameters);
          } else {
            
    $link .= 'index.php?main_page=' $page;
          }
        } else {
          if (
    zen_not_null($parameters)) {
            
    $link .= $page "?" zen_output_string($parameters);
          } else {
            
    $link .= $page;
          }
        }

        
    $separator '&'
    should be changed to:

    PHP Code:
    $separator '&';
        
        if (!
    $static) {
          if (
    zen_not_null($parameters)) {
            
    $link .= 'index.php?main_page='$page "&" zen_output_string($parameters);
          } else {
            
    $link .= 'index.php?main_page=' $page;
          }
        } else {
          if (
    zen_not_null($parameters)) {
            
    $link .= $page "?" zen_output_string($parameters);
          } else {
            
    $link .= $page;
            
            
    $separator '?';
          }
        } 
    That'll prevent any errors occurring when the session ID is appended.

    All the best...

    Conor
    ceon

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Zenid Redirect Issue
    By bumba000 in forum General Questions
    Replies: 7
    Last Post: 23 Jan 2015, 11:52 PM
  2. Replies: 5
    Last Post: 6 Apr 2008, 01:57 AM
  3. zenid
    By scottb in forum General Questions
    Replies: 8
    Last Post: 3 Jan 2007, 06:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR