By Frederick Gimino on Wednesday, 08 January 2014
Posted in General Issues
Replies 11
Likes 0
Views 1K
Votes 0
Hi,

Their is a huge bug with query string urls on the index.html that end like index.html?(.*)=(.*)

I can generate any query string I want like /easydiscuss/index.html?ducks=cows !!!!!!!!

It gets worse! Each of these query strings generates its own canonical url! This is an emergency please help....
Hello Frederick,

Try to add the block of codes below into /components/com_easydiscuss/views/index/view.html.php at around line 70


$document = JFactory::getDocument();
$document->addHeadLink( DiscussRouter::_( 'index.php?option=com_easydiscuss&view=index' , false , true ) , 'canonical', 'rel');


I find it quite surprising that Joomla's plugin is adding the current url as the canonical url as this would then defeat the whole purpose of a canonical url tag
·
Wednesday, 08 January 2014 13:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you send me a list of all query string parameters for easydiscusss to add to my .htaccess to stop this behavior?

like::
RewriteCond %{THE_REQUEST} \?
RewriteCond %{QUERY_STRING} !^option=com_easydiscuss
RewriteCond %{QUERY_STRING} !^option=com_easyblog
RewriteCond %{QUERY_STRING} !^option=com_users
RewriteCond %{QUERY_STRING} !^view=menu
RewriteCond %{QUERY_STRING} !^start=([0-9]+)$
RewriteCond %{QUERY_STRING} !^limitstart=([0-9]+)$
RewriteCond %{QUERY_STRING} !^id=([0-9]+)$
RewriteCond %{QUERY_STRING} !^format=(.*)$
RewriteCond %{QUERY_STRING} !^dropdown=(.*)$
RewriteCond %{QUERY_STRING} !^view=registration


RewriteRule .? xxxxxxx %{REQUEST_URI}? [R=301,L]

I am missing some parameters so if you could supply them I would appreciate it.
·
Wednesday, 08 January 2014 10:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Frederick,

Hm, this is strange because in EasyDIscuss we don't actually add canonical urls. Which particular page are you seeing this?
·
Wednesday, 08 January 2014 12:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi mark core Joomla canonical from /plugins/system/sef/sef.php

I managed to fix the issue with an internal rewrite:

RewriteCond %{THE_REQUEST} \?
RewriteCond %{QUERY_STRING} !^option=com_easydiscuss
RewriteCond %{QUERY_STRING} !^option=com_easyblog
RewriteCond %{QUERY_STRING} !^option=com_users
RewriteCond %{QUERY_STRING} !^task=(.*)$
RewriteCond %{QUERY_STRING} !^view=menu
RewriteCond %{QUERY_STRING} !^start=([0-9]+)$
RewriteCond %{QUERY_STRING} !^limitstart=([0-9]+)$
RewriteCond %{QUERY_STRING} !^id=(.*)$
RewriteCond %{QUERY_STRING} !^format=feed
RewriteCond %{QUERY_STRING} !^view=registration
RewriteCond %{QUERY_STRING} !^controller=(.*)$
RewriteCond %{REQUEST_URI} !^/component/users/(.*)$
RewriteCond %{REQUEST_URI} !^/administrator/(.*)$
RewriteRule .? site\.com%{REQUEST_URI}? [R=301,L]


Did I miss any parameters? Are their any parameters in the toolbar I need to add as I am experiencing conflict after login (unable to dropdown box in firefox although value is changing in code from dropdown to empty tag via jquery)?
·
Wednesday, 08 January 2014 13:01
·
0 Likes
·
0 Votes
·
0 Comments
·
I can take the rewrite off if you would like to examine the behavior and it occurs on all pages ending in .html that I add a query string to. It can be any query string like house=cars. But, if you can't replicate it on another server it must be me. However, I highly doubt it is just isolated to my site.
·
Wednesday, 08 January 2014 13:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Only with the query string url's. And, I am just as surprised as you regarding the duplicate content. I actually found out by accident as I noticed some strange query string pages indexed in Google. I fixed the problem with an internal apache rewrite. The only modification I have made to my stock Joomla is changing sef advance settings from 0 to 1 in my router to remove id's from url's. Besides that it is a stock install. However, I have noticed with query strings that they are a tricky lot and cause issues for many online. Thanks, for the help on this Mark. I am also running a nginx reverse proxy with apache upstream not sure how routing might be affected by this.

On a side note I am experiencing some toolbar issues with the toolbar login and conversation dropdowns not functioning after login. It works fine to login but after it does not work. This only happens in firefox and only with templates that rely on simplistic for files. And, in Zinc everything works fine except that the conversation box hangs on the word loading..... I can access them via view all but the toolbar notification does not seem to be working correctly.

Any thoughts?

Thanks again for the reply Mark. I did not mean any offense you guys have an awesome product. I just got a little freaked when I realized that any query string I could think of would generate a duplicate page.
·
Wednesday, 08 January 2014 19:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Frederick,

I wish I could fix this but unfortunately Joomla 3.2 onwards adds the canonical tag by default like you mentioned in the system - sef plugin I did ran some tests locally and we could probably try to add another update which overrides their canonical tag.
·
Wednesday, 08 January 2014 22:13
·
0 Likes
·
0 Votes
·
0 Comments
·
I fixed it it for my site Mark. No worries. But, could you help with the template issue I am having in Firefox? The toolbar is acting quirky and will not respond in firefox for the simplistic based themes. Zinc works fine but the toolbar does not respond to clicks in firefox. So, the dropdown does not work for me. I am using Zinc but I also have issues with it as well as the loading.... wait screen hangs and never loads conversations any help is appreciated. Thanks.
·
Thursday, 09 January 2014 09:33
·
0 Likes
·
0 Votes
·
0 Comments
·
I am actually glad I find this by the way as %3F was also a valid url. It is weird as It is decoded as an appeneded ? after the .html extension in the canonical but not in the address bar. My rewrite file is starting to look like a book! I may have to go to stackoverflow and ask for some help consolidating rules.
·
Thursday, 09 January 2014 09:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Would this code from another post fix my toolbar issue?

#t3-mainnav .navbar-header
{
position: relative;
z-index: 100
}
·
Thursday, 09 January 2014 09:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you please start a new thread with your issues please?
·
Thursday, 09 January 2014 16:57
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post