• 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
    • Undefined variable: parentfield

    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: Undefined variable: parentfield

    • Issue Tools
      • View Changes
    1. issueid=3798 June 13, 2014 4:56 PM
      hollosch hollosch is offline
      Senior Member
      Undefined variable: parentfield

      Code:
      ErrorException: Undefined variable: parentfield - vault/core/controller/dm/area/vw.php:82
      
      #0 /../vault/core/controller/dm/area/vw.php(82): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/homepages/34/d...', 82, Array)
      #1 /../vault/core/controller/dm/area/xf.php(33): vw_DM_Area_Controller->verify_parentid(0)
      #2 [internal function]: vw_DM_Area_Controller_XF->verify_parentid(0, Object(vw_DM_Area_Controller_XF), 'parentid', Array)
      #3 /../library/XenForo/DataWriter.php(982): call_user_func_array(Array, Array)
      #4 /../library/XenForo/DataWriter.php(725): XenForo_DataWriter->_runVerificationCallback(Array, 0, Array, 'parentid')
      #5 /../library/XenForo/DataWriter.php(643): XenForo_DataWriter->_isFieldValueValid('parentid', Array, 0, Array)
      #6 /../vault/core/controller/dm/xf.php(230): XenForo_DataWriter->set('parentid', 0, NULL)
      #7 /../vault/core/controller/cp/area/vw.php(395): vw_DM_Controller_XF->set('parentid', 0)
      #8 /../vault/core/controller/cp/area/vw.php(158): vw_CP_Area_Controller->set_area_fields(Array)
      #9 /../vault/core/controller/cp/area/vw.php(146): vw_CP_Area_Controller->process_save(Array)
      #10 /../vault/core/controller/cp/area/vw.php(68): vw_CP_Area_Controller->save()
      #11 /../library/vw/XenForo/ControllerAdmin/Wiki.php(107): vw_CP_Area_Controller->execute('save', 'post')
      #12 /../library/XenForo/FrontController.php(347): vw_XenForo_ControllerAdmin_Wiki->actionIndex()
      #13 /../library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
      #14 /../admin.php(13): XenForo_FrontController->run()
      #15 {main}
      
      array(3) {
        ["url"] => string(67) "http://domain.com/admin.php?wiki/&panel=area&do=save"
        ["_GET"] => array(3) {
          ["wiki/"] => string(0) ""
          ["panel"] => string(4) "area"
          ["do"] => string(4) "save"
        }
        ["_POST"] => array(17) {
          ["panel"] => string(4) "area"
          ["do"] => string(4) "save"
          ["_xfToken"] => string(8) "********"
          ["areaid"] => string(1) "2"
          ["title"] => string(6) "System"
          ["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) {
            [2] => string(12) "Deutsch [Du]"
          }
          ["options"] => array(8) {
            ["page_comment"] => string(1) "1"
            ["page_img"] => string(1) "2"
            ["page_bbcode"] => string(1) "4"
            ["page_smile"] => string(1) "8"
            ["comment_img"] => string(2) "32"
            ["comment_bbcode"] => string(2) "64"
            ["comment_smile"] => string(3) "128"
            ["page_header"] => string(1) "1"
          }
          ["topiclist"] => array(1) {
            [-1] => string(9) "Any Topic"
          }
          ["sort"] => string(10) "lastupdate"
          ["sortorder"] => string(3) "asc"
          ["submit"] => string(4) "Save"
          ["url"] => string(59) "http://domain.com/admin.php?wiki/&panel=area"
        }
      }
    Issue Details
    Issue Number 3798
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Admin Panel
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 4.0.0 Gamma 6
    Fixed Version 4.0.0 Gamma 7
    Milestone VaultWiki 4 Gamma X
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. June 14, 2014 9:36 AM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/core/controller/dm/area/vw.php, find:
      Code:
      		if ($this->instance->get($parentfield) AND $parentid == $this->instance->get($parentfield))
      		{
      			$this->instance->error('vw_area_parent_itself');
      			return false;
      		}
      Replace with:
      Code:
      		if (!defined('VW_IS_LITE') OR VW_IS_LITE !== true)
      		{
      			if ($this->instance->get_info('use_parent_areaid'))
      			{
      				$parentfield = 'areaid';
      			}
      			else
      			{
      				$parentfield = 'pageid';
      			}
      
      			if ($this->instance->get($parentfield) AND $parentid == $this->instance->get($parentfield))
      			{
      				$this->instance->error('vw_area_parent_itself');
      				return false;
      			}
      		} // endif VW_IS_LITE
      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 4:19 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 © 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.