• 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
    • Recent Activity Block Issue

    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: Recent Activity Block Issue

    • Issue Tools
      • View Changes
    1. issueid=4290 May 6, 2015 3:36 PM
      Infopro Infopro is offline
      New Member
      Recent Activity Block Issue

      Could you take a look at the attachment and let me know what I need to do to fix the two issues?

      Recent Activity is duplicated
      Share this page text seems broken to me.

      Thanks!
    Issue Details
    Issue Number 4290
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Widgets / Sideblocks
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.0.3
    Fixed Version 4.0.4
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 1
    Assigned Users (none)
    Tags (none)




    1. May 9, 2015 11:20 AM
      pegasus pegasus is offline
      VaultWiki Team
      It would appear that this occurs for custom Recent Activity blocks created based on the activity block-type. It does not occur with the pre-made activity block that the installer creates.

      Apparently the default settings from a block-type are not copied over for any block-type when you create a new block based on another block. Additionally, manual settings on any block, custom or not, that has been edited from its default state cannot be read because json_decode is used against serialized data.

      In order to fix all of these problems on existing blocks, an upgrade script is probably necessary. But you can also get a working block by creating a new one after making the following changes:

      In vault/core/controller/cp/block/base/vw.php, find:
      Code:
      $blockdm->set('data', serialize($data));
      Replace with:
      Code:
      $blockdm->set('data', json_encode($data));
      In vault/core/model/rebuild/vw.php, find:
      Code:
      'varname' => '',
      After it, add:
      Code:
      'defaults' => '',
      Find:
      Code:
      $prep['t']['fields']['varname'] => '',
      After it, add:
      Code:
      $prep['t']['fields']['defaults'] => '',
      In vault/core/model/block/vw.php, find:
      Code:
      		$data = $blockinfo['data'];
      		$data = json_decode($data, true);
      Replace with:
      Code:
      		$data = array();
      
      		if (!empty($blockinfo['defaults']))
      		{
      			$defaults = json_decode($blockinfo['defaults'], true);
      
      			if (!$defaults)
      			{
      				$defaults = @unserialize($blockinfo['defaults']);
      			}
      
      			if (is_array($defaults))
      			{
      				$data = array_merge($data, $defaults);
      			}
      		}
      
      		if (!empty($blockinfo['data']))
      		{
      			$customdata = json_decode($blockinfo['data'], true);
      
      			if (!$customdata)
      			{
      				$customdata = @unserialize($blockinfo['data']);
      			}
      
      			if (is_array($customdata))
      			{
      				$data = array_merge($data, $customdata);
      			}
      		}
      Reply Reply
    2. May 10, 2015 8:17 AM
      Infopro Infopro is offline
      New Member
      It would appear that this occurs for custom Recent Activity blocks created based on the activity block-type. It does not occur with the pre-made activity block that the installer creates.
      This is a fresh installation with nothing customized though.
      Reply Reply
    3. May 10, 2015 10:53 AM
      pegasus pegasus is offline
      VaultWiki Team
      Added an upgrade script to fix existing blocks, even though the above code should allow them to work as expected anyway.

      Marking as fixed in the next release.

      Not sure how you got this issue to occur on a pre-installed block, but the code I posted above should make any unreadable block configs become readable again, regardless how they got into that state. You may have to edit an affected block to trigger it to be read into the cache again.
      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 2:43 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.