The acquia_purge_ajax_processor ajax request returns a redirect and is not working

Created on 21 December 2017, about 7 years ago
Updated 16 May 2023, over 1 year ago

In our website that is using language path prefixes, e.g. /en, /de, etc, the AJAX request to purge the cache returns a 301 redirect. The code that used to define the path of the request is:

  // Declare the trigger path the script will call back home to.
  var triggerPath = 'acquia_purge_ajax_processor';
  var triggerPath = Drupal.settings.basePath + triggerPath;

With a small adjustment the pathPrefix can be taken into account:

  // Declare the trigger path the script will call back home to.
  var triggerPath = 'acquia_purge_ajax_processor';
  var triggerPath = Drupal.settings.basePath + Drupal.settings.pathPrefix + triggerPath;

I tried to create a patch, included with this report. This fixed the issue for our website.
Hope it helps!

πŸ› Bug report
Status

Fixed

Version

1.3

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Gerben Spil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024