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.

May be related to #190170: Update Secure Pages default parameters to ignore */ajax/* urls.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

solotandem’s picture

Status: Active » Needs review
FileSize
1.33 KB

See patch.

geophysicist’s picture

FileSize
1.25 KB

Here is new one patch. It changed because there is new couple lines about language in securepages.module

hargobind’s picture

FileSize
1.26 KB

This is a minor update on #3 that includes form key sanitization that was added to 7.x-1.2.

Steven Jones’s picture

Status: Needs review » Needs work

The patch in #3 introduces an issue, in that the following lines then don't work..

Steven Jones’s picture

Status: Needs work » Needs review
FileSize
1.48 KB

Here's an updated patch that sorts that issue.

alevin’s picture

I believe we have the same issue on drupal 6.37.

Using:
Secure Pages 1.11
Panels 3.10