CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #35649

duplicated content because of pagebrowse logic

Added by Krystian Szymukowicz about 1 year ago. Updated about 1 year ago.

Status:Accepted Start date:2012-04-03
Priority:Could have Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Votes: 0

Description

hi

I am not sure if you know ext "pagebrowse". Its a universal pagebrowse extension.

Frankly speaking I disliked ext "pagebrowse" for starting counting from 0 not from 1. So when you have 1,2,3,4 and click on 2 then pointer is 1.

I disliked it until today because now I see it has a logic.

So for example if I enter the search engine directly by entering url like:
http://www.example.com/facettierte-suche/
then I will get all results and pagebrowse. So far so good.

But clicking on link "1" in pagebrowse will give me the same content and the url is now:
http://www.example.com/facettierte-suche/&tx_kesearch_pi1[page]=1

So there is at least one drawback of starting pagebrowse pointer from 1 instead of 0.

And are there any advantages to starting it from 1?

History

Updated by Christian Buelter about 1 year ago

  • Status changed from New to Accepted
  • Priority changed from Should have to Could have

I see the point.

Maybe it should be better to just link to

http://www.example.com/facettierte-suche/

If you click on "page 1", because if you start counting from 0, you still get

http://www.example.com/facettierte-suche/&tx_kesearch_pi1[page]=0

which means you still have duplicate content. But since a website search result page normaly should not go into search enginge indexes, I don't see this as big problem.

BTW: There are more parameters which could cause duplicate content, for example the "sorting" parameter.

Updated by Krystian Szymukowicz about 1 year ago

I do not have to get
http://www.example.com/facettierte-suche/&tx_kesearch_pi1[page]=0

it all depends on pagebrowse code. Open this example in your browser:

http://typo3.org/search/?tx_solr[q]=test&tx_solr[page]=1

If you go down on bottom you will see in pagebrowse that link under number "1" is:
http://typo3.org/search/?tx_solr[q]=test

so no tx_solr[page] is added if the value is 0.

 
I agree that the duplicated content is only one of problems - indeed small.

 

But see the ke_search code in other places. You need to explicitly set the pagebrowe counter to 1 in several places:

<input type="image" id="kesearch_submit" src="typo3conf/ext/ke_search/res/img/kesearch_submit.png" class="submit" value="###SUBMIT_VALUE###" onclick="document.getElementById('pagenumber').value=1; document.getElementById('xajax_form_kesearch_pi1').submit();" />

<select id="###FILTERID###" name="###FILTERNAME###" onchange="document.getElementById('pagenumber').value=1; ###ONCHANGE###" ###DISABLED###>

If ke_search was starting counting from 0 this document.getElementById('pagenumber').value=1; will not be needed here. Am I wrong?

Please do not take this as an attack on your code :) I am also learning a lesson here because I was not aware of the side effects of counting from one in pagebrowse.

Updated by Christian Buelter about 1 year ago

Hi Krystian,

I'm not taking this personally ... ;-)

I guess you're right, the pagebrowser parameter should not be necessary if you link to page 1.

You're right, it would be nice to leave out the pagebrowser parameter in the link to page 1.

But I wouldn't consider this a bug, so this is not on the top of our list.

Also available in: Atom PDF