Forums / All Other Contributions/Addons / 'wordpress on zencart' contribution creates unusable links

'wordpress on zencart' contribution creates unusable links

Locked

Views: 1,164

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
21 Apr 2008, 3:13 PM
#1
emupilot avatar

emupilot

New Zenner

Join Date:
Sep 2007
Posts:
21
Plugin Contributions:
1

'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

<a href="http://examplesite.tld/index.php?mainpage=wordpress/&p=tag/exampletag

instead of a working link like

<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

//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!

21 Apr 2008, 4:33 PM
#2
emupilot avatar

emupilot

New Zenner

Join Date:
Sep 2007
Posts:
21
Plugin Contributions:
1

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 /&p=%post_id%
Category base /&category=
Tag base /&tag=

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