#128 ✓resolved
Charles Brunet

Incomplete return url after editing collection item

Reported by Charles Brunet | April 15th, 2009 @ 09:03 AM | in 5.0.3 (closed)

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.

Comments and changes to this ticket

  • Charles Brunet

    Charles Brunet April 15th, 2009 @ 01:43 PM

    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);
    
    
  • Charles Brunet

    Charles Brunet July 30th, 2009 @ 08:54 AM

    • Assigned user changed from “lux” to “Charles Brunet”
    • State changed from “new” to “resolved”
  • Charles Brunet

    Charles Brunet August 7th, 2009 @ 09:41 AM

    • Milestone set to 5.0.3

    [milestone:id#47011 bulk edit command]

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Sitellite web content management system.

People watching this ticket

Tags

Pages