Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007
    Posts
    21
    Plugin Contributions
    1

    bug 'wordpress on zencart' contribution creates unusable links

    i haven't had the time to test if it only occurs with tags, but the tag links (under posts) were not working for me at all, e.g.
    they would be like
    HTML Code:
    <a href="http://examplesite.tld/index.php?mainpage=wordpress/&p=tag/exampletag
    instead of a working link like
    HTML Code:
    <a href="http://examplesite.tld/index.php?mainpage=wordpress/&tag=exampletag
    i know the function that fails to make the link properly, though i'm sure it's not the function itself, it seems to be because $wp_rewrite->tag_structure is not set properly.

    the temporary workaround i did was edit /wp-includes/rewrite.php at line 445
    PHP Code:
    //old
        
    function get_tag_permastruct() {
            if (isset(
    $this->tag_structure)) {

    //new
        
    function get_tag_permastruct() {
    //dodgy hack for tags in WoZ because i don't know how else to fix it :(
    return '/&tag=%tag%';
            if (isset(
    $this->tag_structure)) { 
    because i don't know where/when $wp_rewrite->tag_structure should be set. this fixed the broken links for me, hope this helps others with the same problem!

  2. #2
    Join Date
    Sep 2007
    Posts
    21
    Plugin Contributions
    1

    Idea or Suggestion Re: 'wordpress on zencart' contribution creates unusable links

    ok so that was a bad hack, you can use it if you want, however i've switched to the method below. it seems urls generated by woz are broken in general because wordpress expects to have the query string parameters all to itself or have pretty seo urls with mod_rewrite.

    so if you don't have seo urls and see the woz page using the url
    http://yoursite.tld/index.php?mainpage=wordpress
    (like me) it seems the best you can hope to do is open your wordpress admin, go to Settings > Permalinks and set these values:

    Custom Structure [FONT="monospace"]/&p=%post_id%[/FONT]
    Category base [FONT="monospace"]/&category=[/FONT]
    Tag base [FONT="monospace"]/&tag=[/FONT]

    the resulting urls are hideous but actually work. however, i have not managed to get feeds and trackback working no matter what i try.

    good luck

 

 

Similar Threads

  1. Wordpress and Zencart
    By mhakiwa in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 Jan 2010, 09:09 PM
  2. Zencart and wordpress
    By karenkte in forum General Questions
    Replies: 4
    Last Post: 11 Nov 2009, 01:01 PM
  3. Wordpress in zencart
    By garyrotter in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 16 Jun 2008, 07:32 PM
  4. Wordpress to ZenCart Registration
    By blackc2004 in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 3 Jun 2008, 07:35 PM

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