Upgraded from 1.18 to 2.1 and managed to get the site and DB updated, but the CSS is not downloading properly.
I monitored the HTTP requests with an HTTP debugger, and instead of CSS, the response from that request contains a fragment of HTML with the following error message, plus some binary content (or what appears to be either binary or garbage text). The response is also large, more than 38k.
Here’s the error (I substituted “[my path]” for the specific path used):
Warning: substr_compare(): The start position cannot exceed initial string length in E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger\StylesheetUIAssetMerger.php on line 134
Backtrace -->
#0 Piwik\Error::errorHandler(…) called at [:]
#1 substr_compare(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger\StylesheetUIAssetMerger.php:134]
#2 Piwik\AssetManager\UIAssetMerger\StylesheetUIAssetMerger->countDirectoriesInPathToRoot(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger\StylesheetUIAssetMerger.php:100]
#3 Piwik\AssetManager\UIAssetMerger\StylesheetUIAssetMerger->rewriteCssPathsDirectives(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger\StylesheetUIAssetMerger.php:85]
#4 Piwik\AssetManager\UIAssetMerger\StylesheetUIAssetMerger->processFileContent(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger.php:111]
#5 Piwik\AssetManager\UIAssetMerger->concatenateAssets(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger.php:99]
#6 Piwik\AssetManager\UIAssetMerger->getConcatenatedAssets(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger\StylesheetUIAssetMerger.php:55]
#7 Piwik\AssetManager\UIAssetMerger\StylesheetUIAssetMerger->generateCacheBuster(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger.php:192]
#8 Piwik\AssetManager\UIAssetMerger->getCacheBusterValue(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger.php:155]
#9 Piwik\AssetManager\UIAssetMerger->isFileUpToDate(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger.php:143]
#10 Piwik\AssetManager\UIAssetMerger->shouldGenerate(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager\UIAssetMerger.php:51]
#11 Piwik\AssetManager\UIAssetMerger->generateFile(…) called at [E:\HostingSpaces[my path]\wwwroot\core\AssetManager.php:167]
#12 Piwik\AssetManager->getMergedStylesheet(…) called at [E:\HostingSpaces[my path]\wwwroot\plugins\Proxy\Controller.php:36]
#13 Piwik\Plugins\Proxy\Controller->getCss(…) called at [:]
#14 call_user_func_array(…) called at [E:\HostingSpaces[my path]\wwwroot\core\FrontController.php:521]
#15 Piwik\FrontController->doDispatch(…) called at [E:\HostingSpaces[my path]\wwwroot\core\FrontController.php:84]
#16 Piwik\FrontController->dispatch(…) called at [E:\HostingSpaces[my path]\wwwroot\core\dispatch.php:30]
#17 require_once(…) called at [E:\HostingSpaces[my path]\wwwroot\index.php:47]
Any suggestions for troubleshooting? I tried disabling the asset merging by adding the following to my config.ini.php:
[Debug]
disable_merged_assets = 1
and restarted the web site and app pool (IIS, hosted on a shared server at Arvixe) but it would appear that it’s still merging the assets.
Would appreciate any suggestions for fixing this, as without the styles, the site is completely unreadable.
Thanks!