Commit e2f5e050 authored by gbyte.co's avatar gbyte.co

Changing CacheableResponse back to Response because of caching problems.

parent cb9c6cc0
......@@ -52,7 +52,9 @@ class Batch {
case 'form':
break;
case 'drush':
case 'cron':
print $this->batch['init_message'] . "\r\n";
// drush_log($this->batch['init_message']);
$this->batch =& batch_get();
$this->batch['progressive'] = FALSE;
if (function_exists('drush_backend_batch_process'))
......@@ -60,11 +62,6 @@ class Batch {
else
batch_process();
break;
case 'cron':
$this->batch =& batch_get();
$this->batch['progressive'] = FALSE;
batch_process();
break;
}
}
......@@ -120,7 +117,7 @@ class Batch {
*
* @see https://api.drupal.org/api/drupal/core!includes!form.inc/group/batch/8
*/
static function generate_bundle_urls($query, $info, $batch_info, &$context) {
public static function generate_bundle_urls($query, $info, $batch_info, &$context) {
$languages = \Drupal::languageManager()->getLanguages();
$default_language_id = Simplesitemap::get_default_lang_id();
......
......@@ -6,7 +6,7 @@
namespace Drupal\simple_sitemap\Controller;
use Drupal\Core\Cache\CacheableResponse;
//use Drupal\Core\Cache\CacheableResponse;
use Symfony\Component\HttpFoundation\Response;
use Drupal\simple_sitemap\Simplesitemap;
......@@ -29,6 +29,7 @@ class SimplesitemapController {
$output = $sitemap->get_sitemap($sitemap_id);
// Display sitemap with correct xml header.
return new CacheableResponse($output, Response::HTTP_OK, array('content-type' => 'application/xml'));
// return new CacheableResponse($output, Response::HTTP_OK, array('content-type' => 'application/xml'));
return new Response($output, Response::HTTP_OK, array('content-type' => 'application/xml'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment