Jump to content

Maintenance Mode And Appcontroller.structure Event


Recommended Posts

Posted

when we have a Appcontroller.structure event  that inject some html or javascript code (specially a ajax request to a controller) , it keep redirecting with infinit loop .

 

 

i suggest make a special structure for maintenance mode or disable the event structure for client side in maintenance mode .

 

 

Posted

the sample one , i have added a event.structure that inject a ajaxed request

$(document).ready(function() {
     fetch_data_items();
    });
   
    function fetch_data_items() {
     $(this).blestaRequest("GET", "' . $this->Html->safe($this->base_uri . "plugin/xxxx/index/get_data/") . '", null, function(data) {
      if (data)
       $(".data_items").html(data);
     },
     null,
     {dataType:"json"});
    }

in maintenance mode , the url is returning a 404 error , and every time the page is requesting the data and cause a infinite loop .

 

 

i have resolved the error by disabling the displaying of head, body_start and body_end in maintenance mode in the structure.pdt .

 

what i think , maintenance mode should only show the maintenance message without caring about including the files the javascripts ..ect .

  • 3 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...