Project

General

Profile

Actions

Bug #15887

closed

Hidden fields missing in search form

Added by Nick Weisser about 18 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Should have
Category:
Indexed Search
Target version:
-
Start date:
2006-03-23
Due date:
% Done:

0%

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

Description

By default the following hidden fields are renderd in the search form:

<input type="hidden" name="tx_indexedsearch[_sections]" value="0">
<input type="hidden" name="tx_indexedsearch[pointer]" value="0">
<input type="hidden" name="tx_indexedsearch[type]" value="1">
<input type="hidden" name="tx_indexedsearch[ext]" value="0">

If I want to add the language variable, i.e.

<input type="hidden" name="tx_indexedsearch[lang]" value="0">

with the following TS, this does not work

plugin.tx_indexedsearch.blind.lang = 1

I've verified with the object browser and the value seems to be set correctly, but to no avail.

(issue imported from #M2968)


Files

bug_2968.diff (5.24 KB) bug_2968.diff Administrator Admin, 2006-03-23 14:57
Actions #1

Updated by Nick Weisser about 18 years ago

indexed search 2.9.0
typo3 3.8.1

Actions #2

Updated by Michael Stucki about 18 years ago

The attached patch should solve this problem. Please check.

Actions #3

Updated by Nick Weisser about 18 years ago

Great stuff! That was really a quick patch :-)

Could you please help me out how to best apply the patch. I've never done this before.

My indexed search is not in the typo3/sysext folder, but in typo3conf/ext

I assume that I have to use the patch command from the command line. In which folder do I have to put the patch? In the indexed search folder itself? How do I call the patch command?

Regards,
Nick

Actions #4

Updated by Franz Holzinger about 18 years ago

"In which folder do I have to put the patch? In the indexed search folder itself? How do I call the patch command?"

Copy it into the Apache document root directory.

Then call

patch -p1 < bug_2968.diff

And see the output text if everything went fine.

Actions #5

Updated by Nick Weisser about 18 years ago

Thanks for your even quicker response, Franz.

Does this work even if my indexed search is NOT in the sysext folder?

Regards,
Nick

Actions #6

Updated by Franz Holzinger about 18 years ago

No, this method only works when you have the same path as in the diff file.
Copy the patch to the location where the file to be patched is. Try it there. However maybe you have to split the diff file into 2 files then.

Actions #7

Updated by Michael Stucki about 18 years ago

@Franz Koch: This is wrong and confusing!

The patch can be applied whereever you want, the point is just that the code needs to be the same like in the version I was using: 4.0rc1.

I suggest you get 4.0rc1, change into the typo3_src-.... directory and run this command:

patch --dry-run -p1 < /path/to/patchfile.diff

If it works, call the same command again but without --dry-run.

(On the other side, you should know that I tested this already, so you can expect it in 4.0rc2 which is going to be released in short...)

- michael

Actions #8

Updated by Franz Holzinger about 18 years ago

There is still a way to apply this patch also to another TYPO3 version.
Compare the code lines in the files what has been changed. Redo the same changes in your own files. Then you can test it without changing your TYPO3 version.

This however only works if the changes in TYPO3 are not relevant to this patch.

Actions #9

Updated by Karsten Dambekalns about 18 years ago

One can even alter the number of paths stripped from the patch with -p[0-9]. Argh, PLEASE learn your tools, guys (this is not targeted at Nick...)

Actions #10

Updated by Nick Weisser about 18 years ago

I have just applied the patch with the help of your instructions. It was applied successfully.

Now the before missing hidden fields are rendered, but the language variable has a wrong and static value:

<input type="hidden" name="tx_indexedsearch[lang]" value="-1" />

If I change the language the value is still -1. Same thing with all 4 languages of the site in question.

I'm still using TYPO3 3.8.1, but I applied the patch to indexed search from RC1.

Actions #11

Updated by Michael Stucki about 18 years ago

If I set "plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1" it works fine here:

<input type="hidden" name="tx_indexedsearch[lang]" value="1" />

Actions #12

Updated by Nick Weisser about 18 years ago

Yes, that's right, but then the value is always 1 for all languages.

And another problem is that the labels are not being translated into their respective language. With indexed search 2.1.3 this worked fine. If I remember correctly this also worked before I applied the patch to 2.9.0.

Do I have to change these here as well?

result_link_target =
flagRendering = CASE
flagRendering {
key.current = 1
2 = TEXT
2.value = German
default = TEXT
default.value = English
}

What does flagRendering refer to? the flags behind each search result?

Actions #13

Updated by Michael Stucki about 18 years ago

I'm think you are misunderstanding the meaning of the "blind" keys here. In the bug description you have written that you set
plugin.tx_indexedsearch.blind.lang = 1

However this is not to set the language to "1", it is instead being used to hide the language selector from the advanced search form!

If you want to simply force the search to language number 2, then you could use this code instead:

plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 2 # search lang 2 only
plugin.tx_indexedsearch.blind.lang = 1 # hide selector to search other languages

About flag rendering: I'm not sure if this is still working. At least the relevant part has been commented out in the default TS configuration. If this is really a problem, then please open a new bug entry for it.

Actions #14

Updated by Michael Stucki about 18 years ago

Fixed in CVS.

Actions

Also available in: Atom PDF