matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.85k stars 2.64k forks source link

Flash stats are "Loading..." forever #787

Closed anonymous-matomo-user closed 15 years ago

anonymous-matomo-user commented 15 years ago

I'm the developer of the Piwik Drupal module. I'm currently updating the module to v0.4 and have found some issues.

I found that something seems to have changed in Piwik that breaks all reports I have integrated in Drupal. I have build some Drupal reports that loads the flash applets from the Piwik Server. This worked well for some time (for sure up to 0.2.32), but is now broken.

Do you have any idea what could be the issue... I'm little bit lost - the applet loads an then nothing happens - it only shows "Loading data..."

I have also tried to copy and paste the HTML code from Piwik front page to a local file - only to try out, but the same issue occurs - I wonder why it works on the piwik.org site. Any idea???

<object width="100%" height="250" type="application/x-shockwave-flash" bgcolor="#FFFFFF" data="http://piwik.org/demo/libs/open-flash-chart/open-flash-chart.swf?v2i" id="UserCountrygetCountryChart_swf" style="visibility: visible;">
  <param name="allowScriptAccess" value="sameDomain"/>
  <param name="wmode" value="opaque"/>
  <param name="flashvars" value="data-file=http%3A%2F%2Fpiwik.org%2Fdemo%2Findex.php%3Fmodule%3DUserCountry%26action%3DgetCountry%26moduleToWidgetize%3DUserCountry%26actionToWidgetize%3DgetCountry%26idSite%3D1%26period%3Dday%26date%3D2009-05-18%26disableLink%3D1%26viewDataTable%3DgenerateDataChartPie%26filter_sort_column%3Dnb_uniq_visitors%26filter_sort_order%3Ddesc%26filter_limit%3D5&amp;loading=Loading..."/>
</object>

One user also reported the below error and I have also seen it:

Open Flash Chart
IO ERROR
Loading test data
Error #2032

This is the URL that I tried to open:../../data-files/menu.txt
robocoder commented 15 years ago

This is a compat buster in open flash charts 2 re: cross domain security.

Temporary workaround is to use an iframe.

anonymous-matomo-user commented 15 years ago

Oh my goodness... I expected something like this, but wasn't sure... It worked well in 0.2.32. Do you know if this will be fixed? Do you have a code example or a link about the IFRAME workaround?

robocoder commented 15 years ago

You can get the IFRAME workaround from your Piwik dashboard. Click on the Widgets link and look for the "Embed Iframe" textbox with code to cut & paste.

anonymous-matomo-user commented 15 years ago

Thank you! I missed this...

Do you know if the object cross site scripting issue is fixable and if the maintainer of open flash char 2 is working on a fix? If it wouldn't take so long I would keep the current code as is and better wait for the fix before changing all the code...

mattab commented 15 years ago

hass, can you please contact the author of the library and ask him? we would be interested

robocoder commented 15 years ago

(In [1208]) Fixes #787 - change to support embedded widgets across domains; add sample cross domain policy (install in wwwroot and edit list of permitted hosts)

Adobe specification for crossdomain.xml:

anonymous-matomo-user commented 15 years ago

The referenced Adobe link isn't working.

robocoder commented 15 years ago

spec

anonymous-matomo-user commented 15 years ago

I've checked http://www.youtube.com/crossdomain.xml and they do not have a policy with "*". I wonder how it is possible to integrate youtube videos in other sites. Aside this have worked with open chart 1...

anonymous-matomo-user commented 15 years ago

I changed:

<param name="allowScriptAccess" value="sameDomain"/>

to:

<param name="allowScriptAccess" value="always"/>

and now it works...

anonymous-matomo-user commented 15 years ago

You can also remove the parameter as this is the default value if not set.

anonymous-matomo-user commented 15 years ago

Oh - no it seems required...

<param name="allowScriptAccess" value="always"/>

I reopen to give you a chance to change the widget object tags.

robocoder commented 15 years ago

I did change it in [1208].