Most widgets and pages not loading after upgrade

Last week I updated from 1.8 to 2.02 using the automatic updated process for the files. I ran the database update from the command line.

I’m experiencing some pages that are failing to load properly, and some widgets that also will not load. Here’s an example:

No errors are ever produced in the logs.

I did my due diligence and tested the upgrade in a development environment before doing it on a live system. Worked flawlessly on the dev environment, everything is running smootly there still. When I preformed the same actions on my live environment, I got the above results. I’m not sure what the difference is.

Looking at other posts around the forum, they recommended doing a complete file system upgrade, as in removing what was there and doing a replace on the directory with the latest code. I tried this and am still getting the same results.(kept the same config file though)

My php versions differ slightly between live and dev, also they are in different timezones.

Here’s the php versions:
live:
PHP 5.3.23 (cli) (built: Mar 15 2013 11:45:15)

Dev:
PHP 5.3.3 (cli) (built: Jul 12 2013 20:21:47)

I’m happy to give any more information. Just looking for some pointers on how I can get this resolved, or what I screwed up. Thank you so much for your time and consideration.

try delete all files in piwik/tmp/* and try again?

if still not working look with Firebug for the http request requesting the dashboard. What is the response from piwik?

I’ve tried clearing out the tmp directory a couple of times, it has not fixed my troubles.

Inspecting what is going on in the browser, I’m going to walk you through what I’m seeing.

I go to the following url in my piwik setup(domain name changed to example.com for privacy purposes):

Visitors > Overview “Tab” :
https://analytics.example.com/index.php?module=CoreHome&action=index&idSite=1&period=range&date=previous7#module=VisitsSummary&action=index&idSite=1&period=range&date=previous7

An ajax post request is made to this url after the page is loaded:
https://analytics.example.com/index.php?date=previous7&module=VisitsSummary&action=index&idSite=1&period=range

This request is reported as failed in chrome’s inspector.

When I try going to the ajax url, I get a “No data received” error. Looks to me like piwik is silently failing, and it’s failing at a point where the error handler isn’t passing it’s information along so it can be logged.

I have checked the error logs and nothing is there. I’m certain it is the correct log as I can see 404 errors I purposefully generate coming in to the log when I “tail -f” it. (for example trying to go to analytics.example.com/test.php, which doesn’t exist, produces an error in my log file).

When I remove the date parameter from the ajax request, I’m greeted with an error message asking for the date parameter to be set. So I’m certain the request is getting to piwik.

Is there a setting that I can try to force errors to be pushed to the log file, or directly output when encountered?

I’d happily try and debug this myself and contribute my fix back, but I’m not sure how to turn off whatever is causing this error to be hidden, so I don’t even know where to start looking for what is causing this issue. I’m looking more for expert guidance than a do x, y, then z directions on how to fix this.

I’ve looked over the docs, and I just don’t know where to look next. Do you have any further reading I should investigate that might help me solve this?

Is there a particular file in the source I should be looking at that you think might be causing this problem?

Thank you so much for your time and patience.

how much memory is assigned on the php.ini? maybe bump it up?

My current settings are modest:

memory_limit: 64M

I added the following to the top of piwik index file(first line):

ini_set(‘memory_limit’, ‘256M’);

and cleared out my tmp folder. Got the same results.

I then upped it to 512, still getting the same results.

I’m skeptical if it needs to be set higher, but I will go higher if you request a number you think it should be at.

I have piwik set up to process on a cron job nightly, and I have the “Allow Piwik archiving to trigger when reports are viewed from the browser” setting to off(NO).

Thanks again for your time! Any other ideas?

no 512 should be fine.

does dashboard show ok. is it on just visitors metric error occurs?

what browser are you using can you tru another?

I’m using chrome 31.0.1650.63.

I tried it out in firefox 26, and am getting the same results. I have others with different operating systems that produce the same problems.

Only parts of the dashboard load, here are the widgets that load:
Vists Overview
Referrer Websites
Visits By Server Time

These widgets will not load(they are stuck on “loading widget, please wait”, and have similar results to the ajax issues I described earlier in this thread):
Visits Overview (with Graph)
Overview
Pages
Keywords
Visitor Browser
Search Engines

For the main navigation, Any page under the following “main pages” does not load, and produces similar blank responses:
Visitors
Actions
Referrers
UI Framework

The Goals page does load, but I don’t have any goals, and it just displays the add goals form.

If I do an api requests, everything seems to be coming through just fine(results are returned, and they look correct):
http://analytics.example.com/index.php?date=previous7&module=API&method=Referers.getKeywords&action=index&idSite=1&period=range&format=php&token_auth=XXXXX

We have a multi site setup(there are about 75 sites set up), I’ve just been testing with site id of 1. Changing the site id does not change the outcome.

Hope this helps, happy to answer any more questions.

Again, thank you so much for your time and this (usually :slight_smile: wonderful application.

I’m setting up a beta server to test with so I can hopefully help you avoid these troubles in future releases :slight_smile:

the widgets that dont load can you delete them and re add them?

Long story short: Removing and then re-adding the widget does not change the outcome. In fact, I’m not able to add the widget back in at all if it won’t load.

I removed the “Visitors Overview (with Graph)” widget.

When I try to add it back in, the preview comes up, with the "loading widget, please wait… " message.

When clicked, the widget never appears on the dashboard.

Widgets that are working are able to be deleted and added as normal. I can’t get any of the “not loading” widgets to add back into the page.

I choose the option to “reset dashboard”. I’m getting mixed results, the widgets that worked before are still working, but some such as the “keyword” and “referrers websites” widgets are still stuck on the “loading widget, please wait…” message. These did not work before, and using the “reset dashboard” is the only way to add those back onto the page.

Thanks again for your time. Any other ideas?

no not really only thing left is how big a deal is it to update php on live to 5.3.3?

logic being it works in dev but not live if all else is equal the php version is the issue.

can you try setup the cron as in: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo

Maybe you will get a more explicit error or maybe this would fix it?

Well, I’m sorry for wasting your time then, it was php. I updated it to 5.3.3 and everything is working fine now. Thanks again for trying to help. Now here’s hoping nothing else broke :stuck_out_tongue:

I guess PHP 5.3.23 is not compatible with piwik 2?

It should be compatible, can you check the errors in the server error log ?

Hi Matt,
Thanks for your help!

If you read my earlier post, php 5.3.23 was failing silently, no errors were ever produced in the log file, not data was output for certain ajax requests.

Perhaps it was the specific build I was using, it was old(from march of 2013).

All I know is upgrading to 5.3.3 fixed my troubles…

I bet there was a bug fix, but I don’t have the time, or desire to track down exactly what caused this.

I just hope someone else out there having trouble with piwik currently reads this and figures out that they probably just need to update their php, and everything will work as expected.

I have the same problem: most of the widgets are not appearing.
It fails silently for most of them, and for some (Visitor log for example) my apache error log show the following error:
PHP Fatal error: Cannot call overloaded function for non-object in /home/data/var/www/vhosts/pwk1.visimmo3d.com/httpdocs/core/DataTable.php on line 315
My version of PHP is 5.4.25, and my version of Piwik is 2.1-rc9.

I suggest you start your own thread as the problems you describe, although similar, are probably related to a different issue.

what are mem settings of php.ini maybe increase it to at least 512 if not done so already?

In my php.ini I have memory_limit = 1024M
and also:
max_input_time = 60
max_input_nesting_level = 512

Again, this should probably be moved to it’s own thread, instead of high jacking mine…

My problems were related to an older php library, is there a way you can switch to a different version of php?

I have disabled APC on the server and since then the problem does not occur anymore.