Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Incomplete return url after editing collection item

#128

When browsing a collection in cms-app, the url contains many parameters (sorting options, page offset, etc). But after returning from editing an item, all those options but collection are lost. This is because _return hidden input in edit form is encoded using htmlentities_compat instead of urlencode, causing the lost of every parameters after the &.

Solution 1: add $cgi->return = urlencode ( htmlentities_reverse ($this->widgets['return']->getValue ($cgi))); to MailForm constructor (in the derived class).

Solution 2: create a Hidden MF_Widget encoding value using urlencode instead of htmlentities_compat.

Reported by Charles Brunet · April 15th, 2009 @ 09:03 AM

State: resolved
Milestone: 5.0.3
Assigned to: Charles Brunet Charles Brunet

Activity

  1. Charles Brunet
    Charles Brunet

    Oups!

    Proposed solution has side effects. It works when clicking 'OK', but not when clicking 'Cancel'. The right solution is top call JavaScript EncodeURIComponent on extracted return value when building URL for Cancel handling:

    if (f.elements['return'] && f.elements['return'].value.length > 0) {

    window.location.href = "' . site_prefix () . '/index/cms-unlock-action?collection=" + collection + "&key=" + key + "&return=" + EncodeURIComponent (f.elements[\'_return\'].value);
    
    

    April 15th, 2009 @ 01:43 PM

  2. Charles Brunet
    Charles Brunet
    • Assigned user changed from lux to Charles Brunet
    • State changed from new to resolved

    July 30th, 2009 @ 08:54 AM

  3. Charles Brunet
    Charles Brunet
    • Milestone set to 5.0.3

    [milestone:id#47011 bulk edit command]

    August 7th, 2009 @ 09:41 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.