• Resolved neverwinter

    (@neverwinter)


    I have made a WordPress server which I had created using localhost as WordPress Address and Site Address. I’ve been using YadaWiki on it and has been working great.

    To make it accessible on the rest of the network I’ve changed the settings to use the server name instead of localhost, this has ruined the Yada Wiki Listings for outputting Wiki Categories, it lists the category names correctly however the links now look like this:
    https://servername/wordpress/overview/

    Instead of this:
    https://servername/wordpress/wiki/overview/

    Previous and next pages work fine and so does Yada Wiki Listings for Outputting Index.

    This is the SQL updates I ran after changing the options:
    UPDATE wp_options SET option_value = REPLACE(option_value, “localhost/wordpress”, “SERVERNAME/wordpress”) WHERE option_value LIKE ‘%localhost/wordpress%’;
    UPDATE wp_posts SET post_content = REPLACE(post_content, “localhost/wordpress”, “SERVERNAME/wordpress”) WHERE post_content LIKE ‘%localhost/wordpress%’;
    UPDATE wp_posts SET guid = REPLACE(guid, “localhost/wordpress”, “SERVERNAME/wordpress”) WHERE guid LIKE ‘%localhost/wordpress%’;
    UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, “localhost/wordpress”, “SERVERNAME/wordpress”) WHERE meta_value LIKE ‘%localhost/wordpress%’;

    I hope this makes sense.
    Any ideas what’s going on?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author dmccan

    (@dmccan)

    Hi neverwinter,

    I’m sorry that you are having difficulties.

    Are the values for the site set correctly under settings \ general?

    I’ve had good success with Delicious Brains ‘Better Search and Replace’ plugin. I think it lets you select the tables it works on. It has a ‘search’ only test mode also. It is a good idea to make a database backup first.

    When I test, I use the ‘Name’ permalinks option. I don’t think that should matter, as I think I’m using WordPress functions for getting the wiki links. If it worked as ‘localhost/wordpress/’ then I’d think it should work as ‘servername/wordpress’.

    It might provide a clue if you enter a new category and assigned a new wiki article to it.

    I hope something above helps or gives you an idea. Please let me know how it goes.

    Thread Starter neverwinter

    (@neverwinter)

    Thanks for the tip about Better Search and Replace, it would’ve made things a lot easier! However it found no further replacements. I also find it odd that it isn’t working.

    I am using the name permalinks and have created a new category and page… Lets say page4. The permalink on the edit page is correct and the page is there when I click on it:
    https://SERVERNAME/wordpress/wiki/page4/

    However the shortcode link from:
    [yadawikitoc show_toc=”true” category=”page4″ order=”title”]
    is showing as:
    https://SERVERNAME/wordpress/page4/

    If however, I do:
    [yadawiki-index type=”pages” columns=”3″]
    The link is correct.

    Thanks.

    Plugin Author dmccan

    (@dmccan)

    Hi neverwinter,

    I am without a computer and won’t be able to setup a permalink structure like your’s until next week. I looked at the code online around line 123:

    https://plugins.trac.www.ads-software.com/browser/yada-wiki/trunk/includes/yadawiki-frontend.php

    and that is using the call “get_page_link()” which returns the permalink of the page.

    It is possible you found a bug, but if it worked for localhost/wordpress then I’d think it should work for servername/wordpress, though the best way for me to tell is to setup a test site. I’m happy to do that next week if you haven’t found the issue before then.

    I don’t suppose there is any other plugin that sets the link structure?

    Thread Starter neverwinter

    (@neverwinter)

    So installed plugins:
    Column Shortcodes
    Mammoth .docx converter
    TablePress
    Yada Wiki

    The functions are different for index and show toc, one is using get_post_permalink, the other get_page_link.

    I’ve changed line 123 from:

    			$cat_output = $cat_output . '<li><a href="'.get_page_link($item->ID).'">'.$item->post_title.'</a></li>';
    

    to:

    			$cat_output = $cat_output . '<li><a href="'.get_post_permalink($item->ID).'">'.$item->post_title.'</a></li>';
    

    This seems to work, gonna do a little more testing.

    Plugin Author dmccan

    (@dmccan)

    Hi Neverwinter, Thank you for sharing the result of your testing. I will test that change next week as a possible update.

    Best,

    David

    Plugin Author dmccan

    (@dmccan)

    Hi neverwinter,

    I found another place where get_page_link was used and switched both to use get_post_permalink. I did some testing and everything looked good. I included this change in the 2.9 version that was just released, so I’m closing this support topic. Please let me know if you have any questions or further issues.

    Best,

    David

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Wiki Listing Links’ is closed to new replies.