Joomla Component - No Data in the Database


(Alairis) #1

I am running PIWIK 0.6.3 inside Joomla 1.5 as a component and the database is not getting populated.
Here’s a run down on what I have done so far:

  • Checked all requirements - PHP, MySQL etc. which are fine.
  • Reinstalled 3 times and still the same issue.
  • Installed the full version (not Joomla) and same issue.
  • Copied the code to the Body then tried the Head with the same results
  • used IE, Firefox on a linux and 2 windoze machines (javascript enabled)

Next I wanted to try re-pasting the joomla code but I do not know which joomla file PIWIK has modified to get it in there. Its not in the footer.php file.

Also, why is the link an admin link?
/administrator/components/com_piwik/piwik/
would this cause issues due to authentication?

Thanks for your help.

Here is the code paste from PIWIK to notepad to here:


(Christian Schneider) #2

I don’t know in detail what Joomla is doing, but your file

alairis.com/administrator/components/com_piwik/piwik/piwik.php?idsite=1&rec=1&url=http%3A%2F%2Falairis.com%2F&res=1440x900&h=23&m=24&s=19&cookie=1&urlref=&rand=0.662494462442505&pdf=0&qt=1&realp=0&wma=0&dir=0&fla=1&java=1&gears=0&ag=1&action_name=

has a response code 403 Forbidden when calling it via Joomla (in the body).

Problem seems to be the parameter &url=http%3A%2F%2Falairis.com%2F Maybe this is evaluated in Joomlas .htaccess?

Regards,
Christian.


(Alairis) #3

Thanks Christian, the Rewrite options in the .htaccess file are the problem.

After I turned off the SEF URLs and mod_rewrite options in Joomla Global Config, it logged the visitor. So the problem now is how to get PIWIK to work with search friendly URL’s in Joomla when using mod_rewrite.

I don’t know enough about .htaccess to understand the script so I looked for “excluding folders” via google. Here are some of the .htaccess commands I tried; all failed to work.

RewriteCond %{REQUEST_URI} !^/(administrator/components/com_piwik/piwik/.)$
RewriteCond %{REQUEST_URI} !^/(administrator/.
)$
RewriteCond %{REQUEST_URI} !^/(administrator)/.*$

RewriteRule ^(administrator/components/com_piwik/piwik/) - [L]
RewriteRule ^administrator/components/com_piwik/piwik/.*$ - [PT]

I also tried “RewriteEngine Off” in its own .htaccess file in the com_piwik folder and administrator folder. Neither worked as well.
Is there another way to get the URL to work without turning off SEF URL’s?
Or can someone help with the .htaccess code, I can’t be the only one who has run into this, SEO is almost a requirement now.

Thanks again for your help
-Steve


(Christian Schneider) #4

Hi Steve

Maybe you ask the developer in Joomla if they have any idea.

Where I would start is in the Joomla .htaccess file block:
########## Begin - Rewrite rules to block out some common exploits

If you experience problems on your site block out the operations listed below

This attempts to block the most common type of exploit attempts to Joomla!

Block out one after the other RewriteCond statements in the following lines and try out to find which of these lines is the reason.
Don’t block out all at the same time!

Regards,
Christian


(Alairis) #5

Well, so far its still not working here’s what I’ve tried since the last post.

I installed piwik in its own directory called “alairis.com/stats” to remove any “joomla admin” auth stuff that might be causing the problem. That didn’t fix it.

So I uncommented the: RewriteBase /
and tried commenting out each line of the joomla sef section as the previous post suggested.
I thought this would at least ID the line I needed to worry about but it didn’t. No results, here’s the section:

########## Begin - Joomla! core SEF Section

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|.php|.html|.htm|.feed|.pdf|.raw|/[^.])$ [NC]
RewriteRule (.
) index.php

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

########## End - Joomla! core SEF Section

Then I tried creating an .htaccess file in the stats folder and turing rewrite off like this:

.htaccess in stats

RewriteEngine Off

This didn’t work either.

Then I found this guy via google and tried it too, no joy.

RewriteCond %{REQUEST_URI} ^/stats/.*
RewriteRule ^(.+) - [L]

I really like PIWIK so If there’s anyone else that can help please post. This can’t be an uncommon issue.
Thanks
-Steve