• 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
    • Bug
    • Bug when enabling presets discussion topic

    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: Bug when enabling presets discussion topic

    • Issue Tools
      • View Changes
    1. issueid=6087 August 4, 2020 1:17 AM
      medic917 medic917 is offline
      Junior Member
      Bug when enabling presets discussion topic

      When editing an area (/admin.php?wiki/area/&areaid=4&do=edit "Discussion topics allowed in this area") and enabling a preset discussion topic (started from page admin.php?wiki/topic/), I get this error:

      Code:
      Error: Call to a member function presave_called() on null in src/addons/vw/vw/_core/controller/dm/batch/vw.php at line 73
      vw_DM_Batch_Controller->pre_save() in src/addons/vw/vw/_core/controller/dm/page/vw.php at line 1374
      vw_DM_Page_Controller->process_links() in src/addons/vw/vw/_core/controller/dm/page/vw.php at line 922
      vw_DM_Page_Controller->process_revision() in src/addons/vw/vw/_core/controller/dm/page/vw.php at line 811
      vw_DM_Page_Controller->pre_save() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 490
      vw\vw\XF\Entity\EntityBase->_preSave() in src/XF/Mvc/Entity/Entity.php at line 1308
      XF\Mvc\Entity\Entity->preSave() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 481
      vw\vw\XF\Entity\EntityBase->vwPreSave() in src/addons/vw/vw/_core/controller/dm/xf2.php at line 348
      vw_DM_Controller_XF2->pre_save() in src/addons/vw/vw/_core/controller/dm/base/vw.php at line 877
      vw_DM_Base_Controller->internal_pre_save() in src/addons/vw/vw/_core/controller/dm/area/vw.php at line 742
      vw_DM_Area_Controller->pre_save() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 490
      vw\vw\XF\Entity\EntityBase->_preSave() in src/XF/Mvc/Entity/Entity.php at line 1308
      XF\Mvc\Entity\Entity->preSave() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 481
      vw\vw\XF\Entity\EntityBase->vwPreSave() in src/addons/vw/vw/_core/controller/dm/xf2.php at line 348
      vw_DM_Controller_XF2->pre_save() in src/addons/vw/vw/_core/controller/cp/area/vw.php at line 203
      vw_CP_Area_Controller->process_save() in src/addons/vw/vw/_core/controller/cp/area/vw.php at line 173
      vw_CP_Area_Controller->save() in src/addons/vw/vw/_core/controller/cp/area/vw.php at line 64
      vw_CP_Area_Controller->execute() in src/addons/vw/vw/Admin/Controller/Wiki.php at line 103
      vw\vw\Admin\Controller\Wiki->_actionIndex() in src/addons/vw/vw/Mvc/Dispatcher.php at line 30
      vw\vw\Mvc\Dispatcher::dispatch() in src/addons/vw/vw/Admin/Controller/Wiki.php at line 51
      vw\vw\Admin\Controller\Wiki->actionIndex() in src/XF/Mvc/Dispatcher.php at line 350
      XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
      XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
      XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
      XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
      XF\App->run() in src/XF.php at line 391
      XF::runApp() in admin.php at line 13
    Issue Details
    Issue Number 6087
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Unknown
    Status Duplicate
    Priority 4 - Warnings / Script Errors
    Affected Version 4.1.0 RC 3
    Fixed Version (none)
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. August 12, 2020 6:41 PM
      pegasus pegasus is offline
      VaultWiki Team
      This was a known issue with some builds of RC 3. Stable 4.1.0 was released today, and you should no longer have this problem on that release.
      Reply Reply  
    2. August 13, 2020 12:16 AM
      medic917 medic917 is offline
      Junior Member
      Ok, will update soon.
      Reply Reply  
    3. August 13, 2020 5:55 AM
      medic917 medic917 is offline
      Junior Member
      Updated and got a new error when trying this feature again.
      Code:
      ErrorException: [E_WARNING] strlen() expects parameter 1 to be string, array given src/addons/vw/vw/_core/model/string/vw.php:611
      
      Stack trace
      #0 src/addons/vw/vw/_core/model/string/vw.php(611): XF::handlePhpError(2, '[E_WARNING] str...', '/home/admin/web...', 611, Array)
      #1 src/addons/vw/vw/_core/controller/dm/base/vw.php(85): vw_String_Model->mb_clean(Array, '?')
      #2 src/addons/vw/vw/XF/Entity/EntityBase.php(408): vw_DM_Base_Controller->verify_utf8(Array)
      #3 src/XF/Mvc/Entity/Entity.php(613): vw\vw\XF\Entity\EntityBase->_verifyValueCustom(Array, 'prefixlist', 5, Array)
      #4 src/addons/vw/vw/XF/Entity/EntityBase.php(400): XF\Mvc\Entity\Entity->set('prefixlist', Array, Array)
      #5 src/addons/vw/vw/_core/controller/dm/xf2.php(208): vw\vw\XF\Entity\EntityBase->set('prefixlist', Array)
      #6 src/addons/vw/vw/_core/controller/cp/area/vw.php(471): vw_DM_Controller_XF2->set('prefixlist', Array)
      #7 src/addons/vw/vw/_core/controller/cp/area/vw.php(200): vw_CP_Area_Controller->set_area_fields(Array)
      #8 src/addons/vw/vw/_core/controller/cp/area/vw.php(173): vw_CP_Area_Controller->process_save(Array)
      #9 src/addons/vw/vw/_core/controller/cp/area/vw.php(64): vw_CP_Area_Controller->save()
      #10 src/addons/vw/vw/Admin/Controller/Wiki.php(103): vw_CP_Area_Controller->execute('save', 'post')
      #11 src/addons/vw/vw/Mvc/Dispatcher.php(30): vw\vw\Admin\Controller\Wiki->_actionIndex(Object(XF\Mvc\ParameterBag))
      #12 src/addons/vw/vw/Admin/Controller/Wiki.php(51): vw\vw\Mvc\Dispatcher::dispatch(Object(vw\vw\Admin\Controller\Wiki), 'index', Object(XF\Mvc\ParameterBag))
      #13 src/XF/Mvc/Dispatcher.php(350): vw\vw\Admin\Controller\Wiki->actionIndex(Object(XF\Mvc\ParameterBag))
      #14 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('vw\\vw\\Admin\\Con...', 'Index', Object(XF\Mvc\RouteMatch), Object(vw\vw\Admin\Controller\Wiki), NULL)
      #15 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(vw\vw\Admin\Controller\Wiki), NULL)
      #16 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #17 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
      #18 src/XF.php(391): XF\App->run()
      #19 admin.php(13): XF::runApp('XF\\Admin\\App')
      #20 {main}
      Request state
      array(4) {
        ["url"] => string(21) "/admin.php?wiki/area/"
        ["referrer"] => string(57) "https://web.com/admin.php?wiki/area/&areaid=4&do=edit"
        ["_GET"] => array(1) {
          ["wiki/area/"] => string(0) ""
        }
        ["_POST"] => array(25) {
          ["panel"] => string(4) "area"
          ["do"] => string(4) "save"
          ["_xfToken"] => string(8) "********"
          ["areaid"] => string(1) "4"
          ["prefixid"] => string(1) "0"
          ["title"] => string(13) "List of Books"
          ["parentid"] => string(1) "0"
          ["displayorder"] => string(1) "0"
          ["autoprotect"] => string(1) "0"
          ["prefixlist"] => array(1) {
            [-1] => string(12) "[Any prefix]"
          }
          ["allowtypes"] => array(1) {
            [0] => string(8) "Any type"
          }
          ["langlist"] => array(1) {
            [0] => string(14) "[Any language]"
          }
          ["templaterules"] => array(1) {
            ["value"] => string(0) ""
          }
          ["topiclist"] => array(2) {
            [0] => string(21) "[User-created topics]"
            [4] => string(7) "Test123"
          }
          ["sort"] => string(10) "lastupdate"
          ["sortorder"] => string(4) "desc"
          ["sortfilter"] => string(1) "0"
          ["options"] => array(10) {
            ["list_tiled"] => string(5) "16384"
            ["page_img"] => string(1) "2"
            ["page_bbcode"] => string(1) "4"
            ["page_smile"] => string(1) "8"
            ["page_media"] => string(4) "4096"
            ["comment_img"] => string(2) "32"
            ["comment_bbcode"] => string(2) "64"
            ["comment_smile"] => string(3) "128"
            ["comment_media"] => string(4) "8192"
            ["untabbed"] => string(1) "0"
          }
          ["autolink"] => string(1) "1"
          ["setstyleid"] => string(1) "0"
          ["blocklist"] => array(1) {
            [0] => string(11) "[Any block]"
          }
          ["url"] => string(40) "https://web.com/admin.php?wiki/area/"
          ["_xfRequestUri"] => string(38) "/admin.php?wiki/area/&areaid=4&do=edit"
          ["_xfWithData"] => string(1) "1"
          ["_xfResponseType"] => string(4) "json"
        }
      }
      However, I did have an issue upgrading posted here https://www.vaultwiki.org/issues/6088/
      Reply Reply  
    4. August 13, 2020 1:56 PM
      pegasus pegasus is offline
      VaultWiki Team
      I just encountered this this morning as well. It has now been hotfixed in the current build.

      In src/addons/vw/vw/XF/Entity/EntityBase.php, find:
      Code:
      if ($type == \XF\Mvc\Entity\Entity::STR AND $value !== null AND $value !== '')
      Replace with:
      Code:
      if ($type == \XF\Mvc\Entity\Entity::STR AND is_string($value) AND $value !== '')
      Reply Reply  
    5. August 15, 2020 12:10 AM
      medic917 medic917 is offline
      Junior Member
      Thanks, that fixed it but for some reason, when I actually click on the discussion, it seems like the page isn't created so I end up on the "Uh oh! Something happened." page. The url is generating though (?do=comments&topicid=6). However, other discussion slugs look like this (?do=comments&discussionid=34)

      No errors generating either.

      Is it happening on your end?
      Reply Reply  
    6. August 18, 2020 12:42 AM
      pegasus pegasus is offline
      VaultWiki Team
      I also get a permissions error when visiting a preset discussion topic that hasn't had activity yet. It looks like the problem is related to comments changes introduced in RC 1.

      In src/addons/vw/vw/_core/model/ui/tab/topic/vw.php, find:
      Code:
      	public function get_parent_node(&$item)
      	{
      		if (empty($item['pageid']))
      		{
      			return false;
      		}
      
      		$accesskey = 'Page';
      
      		if (!empty($item['areaid']) AND $item['pageid'] == $item['areaid'])
      		{
      			// save 1 query in this case
      			$accesskey = 'Area';
      		}
      
      		return vw_Hard_Core::controller('Fetch')->get($accesskey, $item['pageid']);
      	}
      Replace with:
      Code:
      	public function get_parent_node(&$item)
      	{
      		if (empty($item['contentid']))
      		{
      			return false;
      		}
      
      		$accesskey = $item['contenttypeid'];
      
      		if (!empty($item['areaid']) AND $item['contentid'] == $item['areaid'] AND $item['contenttypeid'] == vw_Hard_Core::model('Node')->id('Page'))
      		{
      			// save 1 query in this case
      			$accesskey = 'Area';
      		}
      
      		return vw_Hard_Core::controller('Fetch')->get($accesskey, $item['contentid']);
      	}
      (beware scollbars)
      Reply Reply  
    7. August 18, 2020 6:36 PM
      medic917 medic917 is offline
      Junior Member
      Thanks again and I will be weary of the scrollbars (haha a bad joke).

      Confirmed working for me after fix.
      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 10:41 AM.
    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 © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.