Problem/Motivation
To recreate this problem, install panels 3.3 and the latest dev release of Secure Pages. Enable the node template panel, add a variant for a content type, add a field from that entity, and try to edit the style. It will fail with:
An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: http://foo.bar.com/ttps%3A//foo.bar.com/panels/ajax/editor/style-settings/panel_context%253Anode_view%253Anode_view_panel_context_3/region/center
StatusText:
ResponseText:
ReadyState: 4
In some places, the Panels code sets an absolute URL as the form action. When encountered in securepages_form_alter()
, the URL passes the test of securepages_can_alter_url()
and so is considered for alteration. However, the code block only handles the use case of a relative path, not an absolute path.
As shown above, the action URL has a doubling of the domain name with the second occurrence missing the leading "h" in the protocol.
See #2029839: Replace absolute URLs with relative URLs in the Panels queue.
Proposed resolution
Handle the use case of an absolute URL.
Remaining tasks
Review, test.
User interface changes
None.
API changes
None.
Related Issues
May be related to #190170: Update Secure Pages default parameters to ignore */ajax/* urls.
Comment | File | Size | Author |
---|---|---|---|
#5 | properly_handle_a_form-2029965-5.patch | 1.48 KB | Steven Jones |
#3 | properly_handle_a_form-2029965-3.patch | 1.26 KB | hargobind |
Comments
Comment #1
solotandem CreditAttribution: solotandem commentedSee patch.
Comment #2
geophysicist CreditAttribution: geophysicist commentedHere is new one patch. It changed because there is new couple lines about language in securepages.module
Comment #3
hargobindThis is a minor update on #3 that includes form key sanitization that was added to 7.x-1.2.
Comment #4
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedThe patch in #3 introduces an issue, in that the following lines then don't work..
Comment #5
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedHere's an updated patch that sorts that issue.
Comment #6
alevin CreditAttribution: alevin commentedI believe we have the same issue on drupal 6.37.
Using:
Secure Pages 1.11
Panels 3.10