Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to use "Ubercart Ajax Cart" for Authcache ( http://www.ubercart.org/node/13521 ) without luck since all ajax calls fail.
I'm posting it here because the module seems not be maintained anymore and because other people will search for Authcache ajax problems here. Hope this is ok :)
Firebug says:
GET http://localhost/tickets/?uc_ajax_cart_authcache=null&max_age=3600 301 Moved Permanently js_02d...ca14.js (Zeile 19)
GET http://localhost/tickets/ajax?uc_ajax_cart_authcache=null&max_age=3600 404 Not Found
As you can see from the modules js-file the ajax call is fired correctly by calling "Authcache.ajaxRequest(ajaxJason)".
authcache_custom.php looks fine, too:
function _authcache_uc_ajax_cart_authcache($vars) {
// We need to stuff $_GET['q'] with a path that matches the securepages ignore list, otherwise
// securepages will try to redirect us, and the ajax request will fail.
$_GET['q'] = '/ajax/';
// This won't work without a full bootstrap
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_once dirname(drupal_get_filename('module', 'uc_ajax_cart_authcache')) . '/uc_ajax_cart_authcache.module';
return uc_ajax_cart_authcache_block_view();
}
Comments
Comment #1
haggins CreditAttribution: haggins commentedAs I'm reading my post I'm able to solve the problem:
just uncomment line "$_GET['q'] = '/ajax/';"
However, the "Ubercart Ajax Cart (Authcache)" module is not working properly.