Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to change Permalinks of topics?

2»

Comments

  • @rajlaksh follow Shadowdares link to give more info on the actual error and please tell when it appears: after activating or after surfing to /Plugin/Replacer.

    Besides of that, using the regex on a table dump is the much cleaner approach. Do you have a text editor that supports regex? I personally use Notepad++.
    You would have to open phpMyAdmin (or whatever tool you use to access your db) and export table GDN_Discussion and GDN_Comment.
    Make a backup copy of both files.
    Open one of them in Notepad++
    Search for (forums\.example\.com\/)(\d+)-(.*)(\/#post)(\d+)
    Check you get correct results
    Go to Search and Replace and set $1discussion/$2/$3/#Comment_$5 as the replace term
    Repeat the same for the next file
    Afterwards import both files to your db again.

    Pro: no timeouts, no bonks
    Con: you will have to make your forum read only for the time you are working on the exports, so that newly posted content will not "disappear"

    If the plugin is not working for you, your forum is down anyway, so the mentioned con is not really a valid disadvantage ;)

  • http://forums.example.com/798-hi/ == that Bonk Error.

    I've Backup whole db for security. :)

    Vanilla is in sub directory. So My forum not get effect.

    http://forums.example.com/Vanilla/

    Server: NGINX+PHP-FPM = php 5.5.

    Mysql = mysqli

    I only use notepad++ :)

  • Really sorry, I might have get you wrong all the time and I'm glad you've backed up the db...

    • I have assumed you are using a brand new Vanilla install under forums.example.com. Right?
    • You should have the standard "BAM!" discussion under forums.example.com/discussion/1/bam-you-ve-got-a-sweet-forum. Right?
    • You have old links in the form forums.example.com/1-bam-you-ve-got-a-sweet-forum#post1. Right?
    • You have run the plugin and now tried to open forums.example.com/1-bam-you-ve-got-a-sweet-forum#post1? Why? That should be a non existing link now.
  • @R_J yup.
    So need rewrite there? in vbseo only vbseo.php file everything running. so in Vanilla SEO reject my link. because it can't change permalinks.

    So i need to routes Replacer?

  • Forget vbseo.
    With the plugin or notepad++ you've already changed all occurrences of the old link format in your forum. So calling an old link should give you an 404 but not a bonk error. Please follow Shadowdares advice above and tell us the real message of the error.

    You'll need "moved permanently" routes for old external links to your forum, though.

  • rajlakshrajlaksh New
    edited November 2013

    @R_J Thanks. When i visit /Plugin/Replacer/ its show topics with DEBUG: A-D.

    Debeg= True in config file.

    The error occurred on or near: /home/forum/Vanilla/library/core/class.autoloader.php

    line 386 is in red colour: $MapHash = 'context:'.GetValue($ContextType, array_flip(self::$ContextOrder)).''.$Extension.''.$MapHash;

    Now don't say your website located in Wrong directory. hahha.

    Here is complete error.

    Fatal Error in Gdn_Autoloader.RegisterMap();
    Only variables should be passed by reference
    The error occurred on or near: /home/forum/Vanilla/library/core/class.autoloader.php

    382: $Options['MapIdentifier'] = $MapIdentifier;

    383: $MapHash = md5($MapIdentifier);

    384:

    385: // Allow intrinsic ordering / layering of contexts by prefixing them with a context number

    386: $MapHash = 'context:'.GetValue($ContextType, array_flip(self::$ContextOrder)).''.$Extension.''.$MapHash;

    387:

    388: if (!is_array(self::$Maps))

    389: self::$Maps = array();

    390:

    Backtrace:

    [/home/forum/Vanilla/library/core/class.autoloader.php:386] PHP::Gdn_ErrorHandler();

    [/home/forum/Vanilla/library/core/class.autoloader.php:142] Gdn_Autoloader::RegisterMap();

    [/home/forum/Vanilla/library/core/class.autoloader.php:95] Gdn_Autoloader::AttachApplication();

    [/home/forum/Vanilla/bootstrap.php:73] Gdn_Autoloader::Attach();

    [/home/forum/Vanilla/index.php:41] PHP::require_once();

    Variables in local scope:

    [MapType] 'controller'

    [ContextType] 'application'

    [SearchPath] '/home/forum/Vanilla/applications/dashboard/controllers'

    [Options] array (
    'SearchSubfolders' => false,
    'Extension' => 'dashboard',
    'ContextPrefix' => 'a',
    'ClassFilter' => '*',
    'SaveToDisk' => true,
    'MapIdentifier' => 'controller|application|dashboard|/home/forum/Vanilla/cache',
    )

    [DefaultOptions] array (
    'SearchSubfolders' => true,
    'Extension' => NULL,
    'ContextPrefix' => 'a',
    'ClassFilter' => '*',
    'SaveToDisk' => true,
    )

    [Extension] 'dashboard'

    [Hits] 1

    [MapRootLocation] '/home/forum/Vanilla/cache'

    [MapIdentifier] 'controller|application|dashboard|/home/forum/Vanilla/cache'

    [MapHash] '0a4b26e64f84988db34d8f039fb9b5b5'

    Additional information for support personnel:

    Application: Vanilla
    Application Version: 2.0.18.8
    PHP Version: 5.5.5
    Operating System: Linux
    Server Software: nginx/1.4.3
    

    Also anyone got solution for Vanilla Statistics?

  • All right, digging deeper is a waste of time, for usin a plugin hasn't been the best way to solve your problem. Have you tried this =>

    @R_J said:
    rajlaksh follow Shadowdares link to give more info on the actual error and please tell when it appears: after activating or after surfing to /Plugin/Replacer.

    Besides of that, using the regex on a table dump is the much cleaner approach. Do you have a text editor that supports regex? I personally use Notepad++.
    You would have to open phpMyAdmin (or whatever tool you use to access your db) and export table GDN_Discussion and GDN_Comment.
    Make a backup copy of both files.
    Open one of them in Notepad++
    Search for (forums\.example\.com\/)(\d+)-(.*)(\/#post)(\d+)
    Check you get correct results
    Go to Search and Replace and set $1discussion/$2/$3/#Comment_$5 as the replace term
    Repeat the same for the next file
    Afterwards import both files to your db again.

    Pro: no timeouts, no bonks
    Con: you will have to make your forum read only for the time you are working on the exports, so that newly posted content will not "disappear"

    If the plugin is not working for you, your forum is down anyway, so the mentioned con is not really a valid disadvantage ;)

  • @rajlaksh said:
    Fatal Error in Gdn_Autoloader.RegisterMap();
    Only variables should be passed by reference

    I got this a lot when testing on PHP 5.5. It has to do with deprecation of features. You will have to increase the level of error reporting, or just use PHP 5.3. :D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • rajlakshrajlaksh New
    edited November 2013

    Thanks all of u people for the support and solutions.

    Anyone how to validate Vanilla?

    That error only show in debug mode.

  • @R_J said:
    please tell when it appears: after activating or after surfing to /Plugin/Replacer.

    Error Msg never show. :)

Sign In or Register to comment.