Project

General

Profile

Actions

Bug #22469

closed

Switching pages with browsebox dosn't work

Added by Alexander Claes over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-04-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When clicking a link in the indexed search browsebox these JavaScript error appears:

"Error: document.tx_indexedsearch is undefined"

This error depends on a change in the indexed search default template "/pi1/indexed_search.tmpl" that comes with TYPO3 4.3.3.

Here you can see the changed part, that causes the JS error:

TYPO3 4.3.3:

[...]
<form action="###ACTION_URL###" method="post" id="tx_indexedsearch">
[...]

TYPO3 4.3.2:

[...]
<form action="###ACTION_URL###" method="post" name="tx_indexedsearch">
[...]

Please notice that the attribute "name" changed to "id". There the element "document.tx_indexedsearch" is not available in the DOM.

(issue imported from #M14130)


Files

14130.diff (2.06 KB) 14130.diff Administrator Admin, 2010-06-02 15:43

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #23512: Browsebox broken since 4.3.x?ClosedXavier Perseguers2010-09-07

Actions
Actions #1

Updated by Mark Kuiphuis over 14 years ago

The "name" attribute in the form tag is not a valid XHTML attribute. In fact "id" should be used instead. But then also the file /typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php should be changed:

A possible solution:

Change in function makePointerSelector_link: (starting at line 1859)

$onclick = 'document.'.$this->prefixId.'[\''.$this->prefixId.'[pointer]\'].value=\''.$p.'\';'. 'document.'.$this->prefixId.'[\''.$this->prefixId.'[_freeIndexUid]\'].value=\''.rawurlencode($freeIndexUid).'\';'.    'document.'.$this->prefixId.'.submit();return false;';

into:
$onclick = 'document.getElementById(\'' . $this->prefixId . '_pointer\').value=\''.$p.'\';'. 'document.getElementById(\''.$this->prefixId . '_freeIndexUid\').value=\''.rawurlencode($freeIndexUid).'\';'. 'document.getElementById(\''.$this->prefixId. '\').submit();return false;';

and in the template: indexed_search.tmpl the following should be changed:

<input type="hidden" name="tx_indexedsearch[_freeIndexUid]" value="_" />
<input type="hidden" name="tx_indexedsearch[pointer]" value="0" />

into:

<input type="hidden" name="tx_indexedsearch[_freeIndexUid]" id="tx_indexedsearch_freeIndexUid" value="_" />
<input type="hidden" name="tx_indexedsearch[pointer]" id="tx_indexedsearch_pointer" value="0" />

Sorry for the amount of code, I don't know how to create a patch file :-(

Actions #2

Updated by Ralf Hettinger over 14 years ago

Related to / could be solved with #1347

Actions #3

Updated by Markus Bucher over 14 years ago

As a workaround you can simply change the template from id="tx_indexedsearch" back to name="tx_indexedsearch"
Simple, but working ;-)
Using 4.4.0beta1

Actions #4

Updated by Christian Hernmarck over 14 years ago

or just add 'name="tx_indexedsearch"' to the form-tag...

Actions #5

Updated by Xavier Perseguers over 14 years ago

Committed to:

- trunk (rev. 7800)
- 4-3 (rev. 7801)

Actions #6

Updated by Fronzes Philippe almost 13 years ago

Same kind of bug when one click on the header of a section.

add id="tx_indexedsearch_sections" in template_css.tmpl

replace line 768 by:
$onclick = 'document.getElementById(\'' . $this->prefixId . '_sections\').value=\'' . $theRLid . '\';' .
'document.getElementById(\'' . $this->prefixId . '\').submit();return false;';

Actions #7

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF