[Bug 31385] New: opac-page: Allow searching a page by code in multilanguage env
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Bug ID: 31385 Summary: opac-page: Allow searching a page by code in multilanguage env Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org We could use the column code to switch language. Easier than keeping track of all idnew identifiers for each language. This report adds a optional code and optional lang query parameter. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 139295 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139295&action=edit Bug 31385: Allow searching a CMS page by code Test plan: Add a CMS page with two languages for it. Look at the code column in the DB. Try opac/opac-page.pl?code=[CODE]&lang=[LANG]. Test leaving lang empty and passing various languages. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15326 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15326 [Bug 15326] Add CMS feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Tomas: What do you think? With this patch which is useful on its own already, we could also offer the URL opac-page.pl?code={CODE] instead of page_id. The extra lang parameter is a bonus. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We already have language as a parameter for other pages, like: OPACBASEURL/anypage?language=fr-FR Maybe we could make it match. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #3)
We already have language as a parameter for other pages, like:
OPACBASEURL/anypage?language=fr-FR
Maybe we could make it match.
Good point -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139295|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 139296 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139296&action=edit Bug 31385: Allow searching a CMS page by code Test plan: Add a CMS page with two languages for it. Look at the code column in the DB. Try opac/opac-page.pl?code=[CODE]&lang=[LANG]. Test leaving lang empty and passing various languages. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #4)
(In reply to Katrin Fischer from comment #3)
We already have language as a parameter for other pages, like:
OPACBASEURL/anypage?language=fr-FR
Maybe we could make it match.
Good point
The problem is again with default here. If you would pass language=default it wont get accepted by getlanguage and its friends.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #4)
(In reply to Katrin Fischer from comment #3)
We already have language as a parameter for other pages, like:
OPACBASEURL/anypage?language=fr-FR
Maybe we could make it match.
Good point
What makes sense to me is to pass the id and optionally the language. Look up the news item by id. We now have the code based on the id. If the language of this one doesn't match the given and logged in language, use the code from this one to look of the correct language version. This means we don't need to go mucking about in the database to find the code for the page. Does that make sense? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Kyle M Hall from comment #7)
(In reply to Marcel de Rooy from comment #4)
(In reply to Katrin Fischer from comment #3)
We already have language as a parameter for other pages, like:
OPACBASEURL/anypage?language=fr-FR
Maybe we could make it match.
Good point
What makes sense to me is to pass the id and optionally the language. Look up the news item by id.
We now have the code based on the id. If the language of this one doesn't match the given and logged in language, use the code from this one to look of the correct language version.
This means we don't need to go mucking about in the database to find the code for the page.
Does that make sense?
I will give it a try now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I don't see a need to pass default... pass a language or none. If you don't pass a language, this should work like the other pages: - look at the cookie, if there is none - look at the browser default - if the result doesn't match existing content - use default -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Kyle suggest to pass the page_id which refers to the default record. But when you pass a language too, you could switch to the specific language. It feels a bit odd however to do so. I think it should be possible to pass default. You could use it as your native language in additional contents to reduce records. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I thin default will always be the native language, but it's supposed to be a fallback. I don't think that triggering it directly makes sense. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 139298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139298&action=edit Bug 31385: (follow-up) Switch to language param As Katrin suggested, we should use the language URL param instead. If you pass code, we use the language cookie as fallback. If that does not work, we look for default. Test plan: Try former test plan but use code=X&language=Y. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Kyle M Hall from comment #7)
What makes sense to me is to pass the id and optionally the language. Look up the news item by id.
We now have the code based on the id. If the language of this one doesn't match the given and logged in language, use the code from this one to look of the correct language version.
This means we don't need to go mucking about in the database to find the code for the page.
Will open another report to show this code URL on the additional contents page, and the need for looking it up will be gone. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 139348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139348&action=edit Bug 31385: (follow-up) Same change at intranet side Test plan: Try at staff side: tools/page.pl?code=CODE Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 139349 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139349&action=edit Bug 31385: (follow-up) Add code based URL on the staff CMS view Test plan: Create a page with contents in two languages. Verify that the Default URL shows the default content and the Current language URL shows content based on active language. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #13)
(In reply to Kyle M Hall from comment #7)
What makes sense to me is to pass the id and optionally the language. Look up the news item by id.
We now have the code based on the id. If the language of this one doesn't match the given and logged in language, use the code from this one to look of the correct language version.
This means we don't need to go mucking about in the database to find the code for the page.
Will open another report to show this code URL on the additional contents page, and the need for looking it up will be gone.
Decided to put it here also. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|opac-page: Allow searching |Additional contents: Allow |a page by code in |searching a CMS page by |multilanguage env |code in multilanguage env -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|OPAC |Tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29190 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29190 [Bug 29190] Allow access to cached news pages by code and lang from OPAC start page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139296|0 |1 is obsolete| | Attachment #139298|0 |1 is obsolete| | Attachment #139348|0 |1 is obsolete| | Attachment #139349|0 |1 is obsolete| | --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 139390 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139390&action=edit Bug 31385: Allow searching a CMS page by code Test plan: Add a CMS page with two languages for it. Look at the code column in the DB. Try opac/opac-page.pl?code=[CODE]&lang=[LANG]. Test leaving lang empty and passing various languages. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #18 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 139391 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139391&action=edit Bug 31385: (follow-up) Switch to language param As Katrin suggested, we should use the language URL param instead. If you pass code, we use the language cookie as fallback. If that does not work, we look for default. Test plan: Try former test plan but use code=X&language=Y. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 139392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139392&action=edit Bug 31385: (follow-up) Same change at intranet side Test plan: Try at staff side: tools/page.pl?code=CODE Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #20 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 139393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139393&action=edit Bug 31385: (follow-up) Add code based URL on the staff CMS view Test plan: Create a page with contents in two languages. Verify that the Default URL shows the default content and the Current language URL shows content based on active language. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #21 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #20)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Thx Nick -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #23 from Lucas Gass <lucas@bywatersolutions.com> --- Not needed in 22.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |Needs documenting Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Bug 31385 depends on bug 15326, which changed state. Bug 15326 Summary: Add CMS feature https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15326 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31385 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com Status|Needs documenting |RESOLVED Documentation| |Caroline Cyr La Rose contact| | Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/679 Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org