• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Feature
    • Clean Wiki URLs

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Clean Wiki URLs

    • Issue Tools
      • View Changes
    1. issueid=3591 February 20, 2014 7:35 PM
      moya moya is offline
      New Member
      Clean Wiki URLs

      I'd like to use /wiki/Title instead of wiki_index.php?title=Title.

      How can this be achieved?

      I'm on VW 4 gamma 2.

      I have had similar trouble to get VW3 to run on clean URLs and dont remember how I did make that work...

      I have succeeded in adding a row into vw_route "wiki". With that the index page works as expected, but obviously thats not the way to go...

      I did extensive search and I am perfectly happy with any link to any document that I might have missed

      thanks.

      PS: big thumbs up for the evolution in the code from version 3 to 4.
    Issue Details
    Issue Number 3591
    Issue Type Feature
    Project VaultWiki 4.x Series
    Category URLs / Routing
    Status Rejected
    Priority 3 - Loss of Functionality
    Suggested Version 4.0.0 Gamma 2
    Implemented Version (none)
    Milestone VaultWiki 4 Gamma X
    Software DependencyAny
    License TypePaid
    Votes for this feature 0
    Votes against this feature 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. February 21, 2014 10:40 AM
      pegasus pegasus is offline
      VaultWiki Team
      Here: https://www.vaultwiki.org/manual/Vau...-Configuration
      If you need any help, don't hesitate to ask.

      If you added any rows to vw_route or vw_path that were not there before, I recommend removing them. These tables are handled automatically by the DMs and they don't like duplicates being there if they encounter unexpected values. There should be a blank "" entry for the index page, and you should leave this or the wiki will break.

      There is a bug changing the wiki index to clean URLs. Before you change URLs, apply the following. In vault/core/model/url/vw.php, find:
      Code:
      		return str_replace('/wiki_index', '/%1$s', $script_path['url']);
      Replace with:
      Code:
      		$search = 'wiki_index';
      
      		if (vw_Hard_Core::model('Settings')->get('vw_seo'))
      		{
      			$search .= '.php';
      		}
      
      		return str_replace('/' . $search, '/%1$s', $script_path['url']);
      Reply Reply  
    2. March 1, 2014 9:38 AM
      moya moya is offline
      New Member
      thanks!!!

      first tests indicate thats my problem

      To make sure (we updated from VW3) I wanted to uninstall and reinstall.

      Doing so from VW4 gamma 2 I ran into a false mysql query. (values in IN() cause where not encapsulated in ')

      To successfully deinstall I changed core/controller/install/uninstall/vb3.php:line 30f
      Code:
      				'vwPage',
      				'vwComment'
      to
      Code:
      				"'vwPage'",
      				"'vwComment'"
      considering this I assume there is a bug in: core/model/db/mysql/vw.php:line 509ff
      Code:
      			$input['values'] = implode(',', $input['values']);
      		}
      
      		return " " . $this->wrap($input['field']) . (!$in ? " NOT" : "") . " IN (" . $input['values'] . ") ";
      Change to:
      Code:
      			$input['values'] = implode("','", $input['values']);
      		}
      
      		return " " . $this->wrap($input['field']) . (!$in ? " NOT" : "") . " IN ('" . $input['values'] . "') ";
      I will reinstall gamma2 now. I had problems with permissions (despite administator user group had everything set to yes, no new content could be created, but wiki index could be edited) and also display of user permissions in usergroup admincp, but as mentioned, I played around with the code and cant be sure my installation was clean.

      I also work with an iso encoding. I saw line breaks turn to the string rn in wiki content.


      PS: here the error message
      Code:
      Database error in vBulletin 4.2.2:
      
      Invalid SQL:
      SELECT contenttypeid,class FROM `contenttype` WHERE  `class` IN (vwPage,vwComment)  LIMIT 2;
      
      MySQL Error   : Unknown column 'vwPage' in 'where clause'
      Error Number  : 1054
      Request Date  : Saturday, March 1st 2014 @ 03:08:05 PM
      Error Date    : Saturday, March 1st 2014 @ 03:08:05 PM
      Script        : http://vbf.ayom.com/admincp/plugin.php?do=productkill
      Referrer      : http://vbf.ayom.com/admincp/plugin.php?do=productdelete&productid=vaultwiki
      IP Address    : 31.165.170.91
      Username      : adminvb
      Classname     : vB_Database
      MySQL Version : 5.1.70-cll
      
      Stack Trace:
      
      #0 vB_Database->halt() called in [path]/includes/class_core.php on line 426
      #1 vB_Database->execute_query() called in [path]/includes/class_core.php on line 459
      #2 vB_Database->query_read() called in [path]/vault/core/controller/db/vb3.php on line 187
      #3 vw_DB_Controller_vB3->query_read() called in [path]/vault/core/model/db/mysql/vw.php on line 29
      #4 vw_DB_MySQL_Model->select() called in [path]/vault/core/controller/install/uninstall/vb3.php on line 34
      #5 vw_Install_UnInstall_Controller_vB3->remove_insertions() called in [path]/vault/core/controller/install/uninstall/vw.php on line 29
      #6 vw_Install_UnInstall_Controller->execute() called in [path]/admincp/plugin.php(1556) : eval()'d code on line 13
      #7 eval() called in [path]/admincp/plugin.php on line 1556
      PS:
      Code:
      Warning: Creating default object from empty value in ..../vault/core/model/datastore/vb3.php on line 124
      using PHP 5.4
      I added to line 118:
      Code:
       		if (!is_object($vbulletin)) return;
      as the method was called before $vbulletin exists. Not really sure it makes sense..
      Reply Reply  
    3. March 1, 2014 11:02 AM
      moya moya is offline
      New Member
      OK, I have reinstalled gamma 2, VB 4.2.2. vbseo, set URL to "wiki" (was wiki_index) and url Path to /wiki/Prefix:Article.

      Wiki main page and special pages are now accessible under a very nice url

      Further I have a bug in AdminCP -> Usergroups -> Permission.
      See attached Image.


      I have set AdminCP -> VW -> Permissions of administrator to all Yes.

      When I edit wiki index page:

      1. The text is stored, but I am redirected to the edit form
      2. Line Breaks are killed ("\r\n" => rn) (Pro Memoria: I use ISO encoding, not UTF)
      3. when I create an area and edit its main page I am shown a edit success message and redirected to said area main page

      Also I see no "Create new page link"

      When I add a link in the index page and click it I get a "page not found". before reinstalling I got a vbulletin error no permissions.
      thus ruling out rewrite rules as the problem.

      Given last point I assume that linking a non existing article would lead me to creating it.

      Also when I try to add a category before the layer pop up has time to come, the page is reloaded, thus not able to save categories.
      When I edit main content and then add a category I can cancel the "do you want to leave page" JS alert, thus I can access the add category layer popup, but unfortunately the submit button is disabled...

      PS: the button is only disabled after I press it. Its related to changing the url to /wiki/ instead of wiki_index.php. The url called is: domain/wiki?do=publish&itemtypeid=7
      it should be:
      domain/wiki/?do=publish&itemtypeid=7

      this leads me to the question if wiki/ instead of wiki should be entered as "name of file or folder" (originally "wiki_index")

      PS: also after the code replacement you have mentioned in your first post I don't think VW still works in default configuration using wiki_index.php as it actually points to wiki_index/
      Reply Reply  
    4. March 1, 2014 11:08 AM
      pegasus pegasus is offline
      VaultWiki Team
      There is not a bug in mysql/vw.php. The entries are not escaped internally so that column matching can take place if we want that, and so that we can support other MySQL datatypes that do not work when cast as a string. For this quoting is required each time we call the MySQL function, so your first change is correct since vwPage and vwComment are not column names.
      Reply Reply  
    5. June 27, 2014 9:11 AM
      moya moya is offline
      New Member
      Hi

      After a fresh install of gamma 6 I changed the settings as usual (url= /wiki/article).
      The issue still persists - and as I have understood by your last answer - you know best how. /core/controll/route: is_wiki et al just need there to be script name and it needs to have .php in it

      I would suppose you hide the option to use rewrited urls until you decide to implement this fully.
      best

      PS: install of gamma 6 worked swite despite install manual on homepage broken
      Reply Reply  
    6. June 27, 2014 12:25 PM
      pegasus pegasus is offline
      VaultWiki Team
      vw_Route_Controller::is_wiki tests if the current request was exactly wiki_index.php. If this is true, we can skip some database queries. Otherwise it continues normally for other kinds of URLs. It should have no effect on whether rewritten URLs actually work; it just tries to save queries if the URL looks a certain way.

      Rewritten URLs are fully implemented and have been since a very early Alpha. If you are having problems getting them to work, then I invite you to submit a Ticket Support service in our Members area. If there is a bug, we will fix it, but if there is a configuration mistake on your part, we will just let you know what that is.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 12:32 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.