Skip to:
Content
Pages
Categories
Search
Top
Bottom

Nicer permalinks plugin messes up the forum sitemap


  • ricardouk
    Participant

    @ricardouk

    Hi everyone!

    I´ve just installed bbpress and the nicer permalink pluggin (http://bbpress.org/plugins/topic/nicer-permalinks/), it works but it kind of messes up the sitemap, ive tried 2 sitemap pluggins and same result

    for example the topic url is:

    mydomain/forum/mytopic.html

    but the sitemap url is:

    mydomain/forum//mytopic.html (double // before the individual topic permalink)

    Can anyone tell me if im doing something wrong or check if its the pluggin fault?

    i deactivated the nicer permalink plugin, added a dummy post to refresh the sitemap and voilá the url is correct without “//”, i guess its the pluggin fault here.

    think i might have found something in the nice-filters.php file, altough im no expert it seems the error comes from here, but i think its a fix from someone, so removing the “/” will break something..

    function get_forum_nicer_link( $link ) {

    global $bb;

    // Remove redundant "forum" word from forum link and append '/'. Mandatory! Props: Mohta

    return str_replace( $bb->uri . 'forum/', $bb->uri, $link ) . '/';

    heres my forum (test) url: http://www.ricardouk.com/forums/

    and my sitemap url: http://www.ricardouk.com/forums/sitemap.xml

    Thank you

    Original post started here: (someone should take a look at the registrations here as i’ve been unable to register, so far i tried 3 times until CK told me i could use the wordpress.org forums account over here)

    http://bbshowcase.org/forums/topic/nicer-permalinks-plugins-messes-up-the-forum-sitemap

Viewing 25 replies - 1 through 25 (of 25 total)

  • _ck_
    Participant

    @_ck_

    Rescued from akismet.

    @ricardouk all your posts will unfortunately be marked as spam as they never seem to fix akismet so be patient as it takes mods some time to notice false positives.


    ricardouk
    Participant

    @ricardouk

    Thanks for the clarification _CK_

    I’m surprised my comments are blocked by akismet, i’m not familiar with their algorithm but all 3 emails i used are “clean”, i only use them for personnal use and rarely give them to other people, i use “disposable” ones for other things.

    Once again thanks for your advices/help/clarifications on this.

    Ps: anything i can do on my side to speed up the process?


    _ck_
    Participant

    @_ck_

    Don’t take it personally – akismet screws up dozens of posts here each week, seemingly at random. It either doesn’t like your IP or email address or some weird combo of keywords. It’s also probably why you had so much trouble registering.

    At least you spoke up, imagine how many other people have tried to post here and gave up in vain and wrote off bbpress entirely.

    This is why I tell people not to use akismet but human-test/blocklist instead and rely on mods to look for bad posts.


    mr_pelle
    Participant

    @mr_pelle

    Hi Ricardo!

    “Recent” users comments from bbPress Sitemap Generator plugin page say:

    This plugin does not work with bbpress 1.02

    Tried everything… Still didn’t work.

    This plugin horrible slows down the forum performance

    I cannot get this work

    This really needs an update!

    I strongly suggest you to use another sitemap generator plugin first; if you still will experience problems, please post here the list of the plugins you’re using and the bbPress version you’re on, and I’ll try to help. =)


    ricardouk
    Participant

    @ricardouk

    Hi mr_pelle

    i tried both sitemap pluggins here on bbpress.org without the nicer permalinks pluggin and the sitemap is ok.


    mr_pelle
    Participant

    @mr_pelle

    Both plugins? Can you link me the one I missed, please?


    ricardouk
    Participant

    @ricardouk

    one of the sitemap pluggins i tried needs to be configured in the php, they’re not as straigthforward as the wordpress one so i can imagine lots of people having problems in setting them up, but i had no problems untill i activated the nicer permalinks pluggin

    one of them needs another pluggin to work properly and some people might not notice it in the description (2nd one in the screenshot), im using the bbpress sitemap generator (1st one in the screenshot)

    heres the screenshot

    http://img828.imageshack.us/img828/6827/sitemap.jpg


    mr_pelle
    Participant

    @mr_pelle

    I’ve just found and fixed the bug in my plugin: I’ll upload a new version within minutes. =D


    ricardouk
    Participant

    @ricardouk

    Thanks for the quick fix Mr_pelle!


    ricardouk
    Participant

    @ricardouk

    here’s the screenshot showing the fix + sitemap generator work properly, i tested it by sbmitting it to google

    http://img707.imageshack.us/img707/3936/siteq.jpg


    Laurent
    Member

    @oreillemalade

    Hello,

    I’m using Nicer Permalinks 3.3.3 avec want to upgrade to 5.0.4 (for sitemap and other minor bugs) but it doesn’t work. I followed the installation instructions though… So I installed back 3.3.3 and it’s working perfectly again.

    Can someone help me ?

    Thanks !

    http://www.oreille-malade.com/forum


    mr_pelle
    Participant

    @mr_pelle

    Hi! Plugin structure has changed a lot after v5.0: I suggest you to first backup your .htaccess, then delete it and the nicer-permalinks folder too. After that, install plugin latest release (following the instructions) and activate it from the configuration page.

    Please note that since v4.1 PHP5 is required.


    Laurent
    Member

    @oreillemalade

    It’s working perfectly now.

    Thanks a lot mr_pelle !! :-]

    I’ve just found and fixed the bug in my plugin: I’ll upload a new version within minutes. =D

    http://www.uggukboot.com/products_all.html

    http://www.timberlanduks.com/specials.html

    http://www.newbagsale.com/specials.html


    zaerl
    Participant

    @zaerl

    I don’t think that it’s THAT difficult to filter these spam posts. The site is always the same.


    Laurent
    Member

    @oreillemalade

    Hi again,

    I just posted a new message on my forum and checked up on Google the way it was indexed. Sadly it’s not the way I expected.

    My search was :

    http://www.google.fr/#hl=fr&q=noomiz+malade&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=5a60871ebcf5564a

    On Google :

    http://www.oreille-malade.com/forum/topic/noomiz-nouveau-talent

    URL of the post on my forum (better permalink) :

    http://www.oreille-malade.com/forum/disque/noomiz-nouveau-talent

    What could I do to make Google index the right url (…/forum/disque/…) ?

    I’m using :

    bbPress 1.0.2

    Google Sitemaps Version 0.1 | Par Olaf Lederer

    Nicer Permalinks Version 5.0.4 | Par mr_pelle


    ricardouk
    Participant

    @ricardouk

    what is your sitemap.xml url?

    Are the url’s in the xml correct?

    Do you have a google webmaster tools account?

    Have you submitted the sitemap into google webmaster account?


    Laurent
    Member

    @oreillemalade

    My sitemap.xml url :

    http://www.oreille-malade.com/sitemap.bb.xml

    urls are not correct but that’s very strange…

    For my example, url in the sitemap is :

    http://www.oreille-malade.com/forum/cinema/noomiz-nouveau-talent

    In fact all urls in the sitemap look like this :

    http://www.oreille-malade.com/forum/cinema/ [...]

    I really don’t get it !

    Shall I change sitemap plugin ?

    Thanks a lot for your help :-]

    PS :

    I have a Google webmaster account and submitted the sitemap ;-)


    Laurent
    Member

    @oreillemalade

    Hi ! :)

    Any idea ?

    Shall I try to install bbPress Sitemap Generator (0.6.1) Author: Rich Boakes & Frédéric Petit ?

    Or this one ? :

    http://www.finalwebsites.com/bbpress/google-sitemap.php

    Is there another sitemap plugin for bbpress 1.0.2 ?

    Regards


    Laurent
    Member

    @oreillemalade

    I just checked and… this is exactly the one I’m already using (Google Sitemaps Version 0.1 | by Olaf Lederer) :-(

    bbPress Sitemap Generator (0.6.1) Author: Rich Boakes & Frédéric Petit is no good ?

    Hello I have the same problem with the sitemap plugins as OreilleMalade.

    As far as I understand the code, the problem lies in the function:

    function discover_topics() {

    global $bbdb, $frequency, $priority;

    $topic_query = "SELECT t.topic_id AS tid, p.post_time AS tim, t.topic_posts AS nposts FROM $bbdb->posts p, $bbdb->topics t WHERE p.topic_id = t.topic_id AND post_status = 0 GROUP BY t.topic_id ORDER BY p.post_time";

    $matches = $bbdb->get_results($topic_query);

    if ($matches) {

    foreach($matches as $match) {

    $url = get_topic_link($match->tid);

    Here is the url generated every time like this:

    domain/topic/topic-name

    If we use nicerpermalinks than we have not the topic-directory in our url and the function get_topic_link gives us the url with the name of the first forum or a random forumname (didn´t figured it out yet).

    domain/first_forum_name/topic-name

    but we have different forum_names now. If I understand the code right, we have to use now get_topic_nicer_link instead of get_topic_link.

    How to make it??

    I made a workaround. Not ideal and not performant, but it works for me…

    function discover_topics() {

    global $bbdb, $frequency, $priority, $bb, $topic;

    $topic_query = "SELECT t.topic_id AS tid, t.forum_id as fid, p.post_time AS tim, t.topic_posts AS nposts FROM $bbdb->posts p, $bbdb->topics t WHERE p.topic_id = t.topic_id AND post_status = 0 GROUP BY t.topic_id ORDER BY p.post_time";

    $matches = $bbdb->get_results($topic_query);

    if ($matches) {

    foreach($matches as $match) {

    $url = get_topic_link($match->tid);

    if ($match->fid!=5) {

    $topic = bb_get_topic_from_uri( $url );

    $url = str_replace( $bb->uri . ‘faq’, $bb->uri . get_forum( $topic->forum_id )->forum_slug, $url );

    }

    Note: set $match->fid!=5 the forum_id of the corresponding forum and replace 'faq' with the slug of the corresponding forum.


    Alex
    Participant

    @cwdnow

    @blupp: This is exactly what I’m looking for. I’ll see if I can come up with a cleaner version. I’m not a php/bbPress expert, so if anyone can jump in on this, it would be much appreciated!


    Alex
    Participant

    @cwdnow

    Okay, I’ve got it working. I simply modified bbpress_sitemap.php. Here’s the file in zip.

Viewing 25 replies - 1 through 25 (of 25 total)

You must be logged in to reply to this topic.