Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1493 closed Bug (fixed)

The merged asset : couldn't be parsed for getting the hashcode

Reported by: christoph Owned by:
Priority: critical Milestone: Piwik 0.6.5
Component: Core Keywords:
Cc: Sensitive: no

Description

Heya!

After upgrading to 0.6.4 both of my installations have died:

The merged asset : couldn't be parsed for getting the hashcode.
Backtrace:

#0 /dir/core/AssetManager.php(386): Piwik_AssetManager::getMergedAssetHash('css')
#1 /dir/core/AssetManager.php(433): Piwik_AssetManager::removeMergedAsset('css')
#2 /dir/plugins/CoreUpdater/CoreUpdater.php(64): Piwik_AssetManager::removeMergedAssets()
#3 [internal function]: Piwik_CoreUpdater->dispatch(Object(Piwik_Event_Notification))
#4 /dir/libs/Event/Dispatcher.php(284): call_user_func_array(Array, Array)
#5 /dir/core/PluginsManager.php(532): Event_Dispatcher->postNotification(Object(Piwik_Event_Notification), true, false)
#6 /dir/core/FrontController.php(227): Piwik_PostEvent('FrontController...')
#7 /dir/index.php(58): Piwik_FrontController->init()
#8 {main}

Change History (5)

comment:1 Changed 4 years ago by matt (mattab)

  • Summary changed from 0.6.4 killed by upgrade to The merged asset : couldn't be parsed for getting the hashcode

Please apply the following patch to your Piwik:

Index: /trunk/core/AssetManager.php
===================================================================
--- /trunk/core/AssetManager.php (revision 2619)
+++ /trunk/core/AssetManager.php (revision 2620)
@@ -325,38 +325,40 @@
 	 *
 	 * @throws Exception if there is more than one file of the same type.
 	 * @return string The hashcode of the merged file, false if not present.
 	 */
 	private static function getMergedAssetHash ($type)
 	{	
 		$mergedFileDirectory = self::getMergedFileDirectory();
 		
 		$matchingFiles = glob( $mergedFileDirectory . "*." . $type );
 		
+		if($matchingFiles === false)
+		{
+			return false;
+		}

(3 lines to add)
does it fix it for you?

comment:2 Changed 4 years ago by Radek Suski

It works for me.
Thank you very much :)

comment:3 Changed 4 years ago by vipsoft (robocoder)

  • Milestone set to 0 - Piwik 0.6.4

comment:4 Changed 4 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [2620] (which also reverts an earlier fix in [2619]).

comment:5 Changed 4 years ago by christoph

Jep works for me as well, thanks!

Note: See TracTickets for help on using tickets.