6.0.0-git
2019-03-23

[#12572] Search from top navigation broken with git HEAD
Summary Search from top navigation broken with git HEAD
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 2013-08-14 (2047 days ago)
Due
Updated 2013-08-26 (2035 days ago)
Assigned 2013-08-16 (2045 days ago)
Resolved 2013-08-23 (2038 days ago)
Milestone
Patch No

History
2013-08-26 19:15:21 Thomas Jarosch Comment #13 Reply to this comment
Changes have been made in Git (master):

commit 0ce9038b0cf2c21f0bc3c57079f57636f8d96de8
Author: Jan Schneider <jan@horde.org>
Date:   Mon Aug 26 18:19:54 2013 +0200

     Need a raw URL here too (Bug #12572).
Merci beaucoup Ján, works fine.

2013-08-26 16:24:31 Jan Schneider Comment #12 Reply to this comment
But removing the string cast from Horde_Tree is a BC break,
so we have to deal with raw URLs even in HTML renderers. At least
until H6.
What about fixing this for Topbar generation only?   
Horde_Tree_Renderer allows a Horde_Tree object to be specified in 
the constructor... so create a class that extends Horde_Tree with 
the fix, and then use this tree object explicitly with the topbar.
Not worth it. Worst thing that happens now is that we have unencoded 
URLs in the initial topbar menu, which is handled fine by all browsers 
AFAIK.
2013-08-26 16:22:07 Git Commit Comment #11 Reply to this comment
Changes have been made in Git (master):

commit 0ce9038b0cf2c21f0bc3c57079f57636f8d96de8
Author: Jan Schneider <jan@horde.org>
Date:   Mon Aug 26 18:19:54 2013 +0200

     Need a raw URL here too (Bug #12572).

  imp/lib/Application.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/0ce9038b0cf2c21f0bc3c57079f57636f8d96de8
2013-08-23 20:00:17 Michael Slusarz Comment #10 Reply to this comment
But removing the string cast from Horde_Tree is a BC break, so we 
have to deal with raw URLs even in HTML renderers. At least until H6.
What about fixing this for Topbar generation only?   
Horde_Tree_Renderer allows a Horde_Tree object to be specified in the 
constructor... so create a class that extends Horde_Tree with the fix, 
and then use this tree object explicitly with the topbar.
2013-08-23 19:12:58 Thomas Jarosch Comment #9 Reply to this comment
After the  dynamic topbar update, both links don't work.
just tested again: With Jan's fix in place, only the "New message"
link is broken after the dynamic update. "Search" works fine.

So I guess we need to do the same fix for "New message"
as we did for the "Search" link, at least for the dynamic topbar update.

2013-08-23 17:29:32 Thomas Jarosch Comment #8 Reply to this comment
It works now for the initial topbar created links (like with my dirty 
workaround patch).

Once the dynamic AJAX topbar upate took place (how long does it 
usually take?),
the link is still broken:

https://intradev/horde/imp/dynamic.php?Horde=ouaafb0e8qrtu7qcinfdbsqjk3&amp;page=compose&amp;popup=1

-> there's an "&amp;" in there. Funnily the "New message" link works 
on initial topbar creation, only "Search" was broken. After the 
dynamic topbar update, both links don't work.

2013-08-23 09:55:06 Jan Schneider Comment #7
Assigned to Jan Schneider
Taken from Michael Slusarz
State ⇒ Resolved
Patch ⇒ No
Reply to this comment
This problem was two-fold. For one we didn't generate unencoded URLs 
for URI_SEARCH and URI_THREAD.
The other problem is that we unconditionally (and incorrectly) cast 
all parameters to strings in Horde_Tree#addNodeParams(). The problem 
is that for JS tree renderers, those need to be set to raw first, if 
they are Horde_Url objects. That should happen only in the JS 
renderer. But removing the string cast from Horde_Tree is a BC break, 
so we have to deal with raw URLs even in HTML renderers. At least 
until H6.
2013-08-23 09:49:10 Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit 25eb932a077ee4fb71bed04c6e87e063a2fac5a0
Author: Jan Schneider <jan@horde.org>
Date:   Fri Aug 23 11:48:22 2013 +0200

     Fix generating URLs for JavaScript (Bug #12572).

  framework/Tree/lib/Horde/Tree.php |    1 +
  imp/lib/Application.php           |    4 ++--
  imp/lib/Basic/Search.php          |    4 +++-
  imp/lib/Basic/Thread.php          |    5 ++++-
  imp/lib/Dynamic/Mailbox.php       |    4 ++--
  5 files changed, 12 insertions(+), 6 deletions(-)

http://git.horde.org/horde-git/-/commit/25eb932a077ee4fb71bed04c6e87e063a2fac5a0
2013-08-20 06:07:13 Michael Slusarz Comment #5 Reply to this comment
Also... I can't reproduce, even with cookies off.
2013-08-16 13:47:56 Jan Schneider Comment #4
State ⇒ Feedback
Reply to this comment
This fix isn't correct. You decide whether you want the raw URL at 
output time, not at generation time. You only want the raw, unencoded 
URL in JavaScript, not in HTML output.
2013-08-15 20:29:56 Thomas Jarosch Comment #3
Assigned to Michael Slusarz
Patch ⇒ Yes
New Attachment: 0001-Fix-generating-the-search-URL.patch Download
Reply to this comment
Attached patch fixes the issue for the top navigation menu and for the 
folder context menu.

Firebug captured this URL:
https:/horde.server.com/horde/imp/basic.php?Horde=di96mh7fn06m37sghtmttnh0u1&amp%3Bpage=search&mailbox=SU5CT1g&token=tm0SvwXXXYnddcAO-UqFJg3

Note the &amp; in there.

2013-08-14 10:44:43 Thomas Jarosch Comment #2 Reply to this comment
Also does not work from the context menu of a folder anymore.

Jan told me it works for him on IRC. May be it's related to non-cookie 
based sessions?

2013-08-14 08:22:14 Thomas Jarosch Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Search from top navigation broken with git HEAD
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
Hi,

when I click on "Webmail -> Search" in the top navigation,
I get a "Page not found" backtrace with latest git HEAD.

IMP_Exception Object
(
     [details] =>
     [logged] => 1
     [_logLevel:protected] => 0
     [message:protected] => Page not found:
     [string:Exception:private] =>
     [code:protected] => 0
     [file:protected] => /datastore/share/pear/www/horde/imp/basic.php
     [line:protected] => 30
     [trace:Exception:private] => Array
         (
         )

     [previous:Exception:private] =>
)

Saved Queries