@cqwww opened this issue on November 4th 2014

Piwik 2.8.3. Using Chrome on osx.The All websites dashboard works, but when I click on one of the websites for details on that website:

@mattab commented on November 4th 2014

thanks for the rpeort! do you see any error in the browser console ? and maybe in your server error log file ?

@cqwww commented on November 4th 2014

Browser console error on index.php?module=MultiSites&action=index&idSite=5&period=day&date=today Uncaught TypeError: Cannot read property 'init' of undefined broadcast.init (anonymous function) j k.fireWith n.extend.ready K and GET http://example.com/piwik/sprintf.min.map 404 (Not Found)

and then browsers console errors on the URL in the original screenshot:

Uncaught TypeError: Cannot read property 'init' of undefined broadcast.init broadcast.propagateAjax menu.onItemClick onclick n.event.trigger (anonymous function) n.extend.each n.fn.n.each n.fn.extend.trigger n.fn.(anonymous function) menu.loadFirstSection (anonymous function) j k.fire n.extend.ready K

and

GET http://www.example.com/piwik/sprintf.min.map 404 (Not Found)

from the server log files: [Tue Nov 04 07:40:06 2014] [error] [client 1.2.3.4] Premature end of script headers: index.php, referer: http://www.example.com/piwik/index.php?module=MultiSites&action=index&idSite=5&period=day&date=today

@tsteur commented on November 4th 2014

Can you open/edit the file config/config.ini.php and have a look if the [Plugins] sections starts with the following?

Plugins[] = CorePluginsAdmin
Plugins[] = CoreAdminHome
Plugins[] = CoreHome

If not, can you try to move them to the beginning or better try to bring your list of plugins in the same order as here https://github.com/piwik/piwik/blob/2.8.3/config/global.ini.php#L635 . If a plugin appears in the list of that file but not in yours just ignore it. Don't add any line, only move them.

@cqwww commented on November 4th 2014

Those first three match, after that, mine differs:

[Plugins] Plugins[] = "CorePluginsAdmin" Plugins[] = "CoreAdminHome" Plugins[] = "CoreHome" Plugins[] = "API" Plugins[] = "Widgetize" Plugins[] = "LanguagesManager" Plugins[] = "Actions" Plugins[] = "Dashboard" Plugins[] = "MultiSites" Plugins[] = "UserSettings" Plugins[] = "UserCountry" Plugins[] = "VisitsSummary" Plugins[] = "VisitFrequency" Plugins[] = "VisitTime" Plugins[] = "VisitorInterest" Plugins[] = "ExampleAPI" Plugins[] = "ExamplePlugin" Plugins[] = "ExampleRssWidget" Plugins[] = "Provider" Plugins[] = "Feedback" Plugins[] = "Login" Plugins[] = "UsersManager" Plugins[] = "SitesManager" Plugins[] = "Installation" Plugins[] = "CustomVariables" Plugins[] = "PrivacyManager" Plugins[] = "ImageGraph" Plugins[] = "Goals" Plugins[] = "Transitions" Plugins[] = "DoNotTrack" Plugins[] = "Annotations" Plugins[] = "MobileMessaging" Plugins[] = "Overlay" Plugins[] = "UserCountryMap" Plugins[] = "SegmentEditor" Plugins[] = "Referrers" Plugins[] = "ScheduledReports" Plugins[] = "Events" Plugins[] = "Morpheus" Plugins[] = "CoreUpdater" Plugins[] = "CoreConsole" Plugins[] = "CoreVisualizations" Plugins[] = "Proxy" Plugins[] = "ZenMode" Plugins[] = "LeftMenu" Plugins[] = "DevicesDetection" Plugins[] = "Contents"

@tsteur commented on November 4th 2014

can you try to bring them in order?

@cqwww commented on November 4th 2014

I've reloaded with the same list as in the default, I'm still getting the error: Uncaught TypeError: Cannot read property 'init' of undefined

I also removed my PluginsInstalled list: [PluginsInstalled] PluginsInstalled[] = "Login" PluginsInstalled[] = "CoreAdminHome" PluginsInstalled[] = "UsersManager" PluginsInstalled[] = "SitesManager" PluginsInstalled[] = "Installation" PluginsInstalled[] = "CorePluginsAdmin" PluginsInstalled[] = "CoreHome" PluginsInstalled[] = "API" PluginsInstalled[] = "Widgetize" PluginsInstalled[] = "LanguagesManager" PluginsInstalled[] = "Actions" PluginsInstalled[] = "Dashboard" PluginsInstalled[] = "MultiSites" PluginsInstalled[] = "UserSettings" PluginsInstalled[] = "UserCountry" PluginsInstalled[] = "VisitsSummary" PluginsInstalled[] = "VisitFrequency" PluginsInstalled[] = "VisitTime" PluginsInstalled[] = "VisitorInterest" PluginsInstalled[] = "ExampleAPI" PluginsInstalled[] = "ExamplePlugin" PluginsInstalled[] = "ExampleRssWidget" PluginsInstalled[] = "Provider" PluginsInstalled[] = "Feedback" PluginsInstalled[] = "CoreUpdater" PluginsInstalled[] = "Proxy" PluginsInstalled[] = "CustomVariables" PluginsInstalled[] = "PrivacyManager" PluginsInstalled[] = "ImageGraph" PluginsInstalled[] = "Goals" PluginsInstalled[] = "Transitions" PluginsInstalled[] = "DoNotTrack" PluginsInstalled[] = "Annotations" PluginsInstalled[] = "MobileMessaging" PluginsInstalled[] = "Overlay" PluginsInstalled[] = "UserCountryMap" PluginsInstalled[] = "SegmentEditor" PluginsInstalled[] = "CoreConsole" PluginsInstalled[] = "CoreVisualizations" PluginsInstalled[] = "Referrers" PluginsInstalled[] = "ScheduledReports" PluginsInstalled[] = "Events" PluginsInstalled[] = "Morpheus" PluginsInstalled[] = "ZenMode" PluginsInstalled[] = "LeftMenu" PluginsInstalled[] = "DevicesDetection" PluginsInstalled[] = "Contents" PluginsInstalled[] = "SEO" PluginsInstalled[] = "Live" PluginsInstalled[] = "Insights"

to the default. The [APISettings] section doesn't exist in mine, I added it. Same error throughout.

@tsteur commented on November 4th 2014

Can you create a user in your Piwik instance for us and send it to hello at piwik.org? View access should be enough, super user would be better in case we need to invalidate a cache or so. This way we can maybe find the error instead of guessing.

@cqwww commented on November 5th 2014

Did you get the email? I sent it yesterday.

@tsteur commented on November 5th 2014

Yes, I got the email and I think I found the problem. Wasn't easy ;) It looks like one file was not copied correctly when you updated to the latest Piwik version. I think it is either plugins/CoreHome/CoreHome.php or plugins/CoreAdminHome/CoreAdminHome.php. Most likely the first file.

What you can do to resolve this issue is to download Piwik again from http://piwik.org, unzip the package and replace those two files on your server with the one from the package. In case it does not work directly you could try to execute the command php console core:clear-caches on the command line within the Piwik directory. If it still doesn't work or if you do not have access to the command line restart your server if possible.

If it still does not work my guess was probably wrong and you should replace all files within your Piwik directory apart from config/config.ini.php see http://piwik.org/docs/update/#the-manual-three-step-update . Again you might have to execute the mentioned command and / or restart the webserver.

Just for interest: From which Piwik version did you update? Which PHP version are you using?

For anyone interested in the technical details behind this: jQuery is loaded twice on this instance. What happens is it loads jQuery, the browser and history plugin, then jQuery again overwriting the previously loaded browser and history plugin. First jQuery 1.11.1 is loaded then jQuery 1.11.0. The latter version is no longer used in 2.8.3 so probably an old version of CoreHome.php still points to this version. The order of the loaded libs leads to the conclusion that CoreHome.php was not updated and I guess the user updated from Piwik 2.7.0 or so.

@tsteur commented on November 5th 2014

I am closing this issue now. Let me know if it worked for you and if not reopen it. Please also let me know the answer to the two questions as it would be helpful for us. BTW: You can remove the user again from your Piwik instance.

@cqwww commented on November 5th 2014

Once I did the clear-caches, it began to work again, thanks!

@tsteur commented on November 6th 2014

Do you know from which Piwik version you upgraded to Piwik 2.8.3?

@mattab commented on November 6th 2014

It's been a few times that we help users that had problems with wrongly uploaded files. The system check should have mentioned that one file was not upgraded correctly. Maybe next time we should always remember to ask users to check their system check is all green including the "File integrity" section.

This issue was closed on November 5th 2014
Powered by GitHub Issue Mirror