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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...