Freezing IE after admin update!?

Help with installation and general calendar setttings

Freezing IE after admin update!?

Postby Joe » Thu May 06, 2010 10:29 am

Hello, first I will thank you for very good script, second, I was installed Aviability calendar on my test site, it was working fine, with few small errors with charset (perhaps it is my mistake), but when I did same thing on my main site, after I update anything inside admin area, I get confirmation box on the right bottom site that some value is saved or not saved, and after that IE 8 freeze totaly and so much that I cannot close the window, and I have big difficulty to shut down that window with Ctrl+Alt+Delete.

So I am interesting for cause of this? I don't know for sur, but it seems when I update something inside admin area of the calendar, database is updated with ajax, so perhaps some htaccess file what I cannot see, block that, or something like that?


So I need to know exact reason what was happiend so I will be able after that to spoke with my host to fix that problem.

Any idea wy this happiend?

Thanx
Joe
 
Posts: 5
Joined: Thu May 06, 2010 10:17 am

Re: Freezing IE after admin update!?

Postby chris » Thu May 06, 2010 10:47 am

Hi,
This is a know issue that, as of yet, I have not been able to resolve.
It only happens in IE8
It is caused by the javascript code that sends the small messages in the bottom right-hand corner when you modify something.

There are 2 quick solutions:
1. Use IE8 in "compatability mode".
2. In the ac-admin > index.php file comment out or remove the lines 109 - 112 which should be these:
Code: Select all
if(isset($warning)){
   $xtra_moo.="
   roar.alert('Information : ','".$warning."');
   ";
}

This will mean that you won't get the messages but I am sure that you can cope with that.
I will try to resolve this problem (possibly be simply removing the alerts from the code) in the next version.

Sorry about this :(

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Freezing IE after admin update!?

Postby Joe » Thu May 06, 2010 11:02 am

chris wrote:Hi,
This is a know issue that, as of yet, I have not been able to resolve.
It only happens in IE8
It is caused by the javascript code that sends the small messages in the bottom right-hand corner when you modify something.

There are 2 quick solutions:
1. Use IE8 in "compatability mode".
2. In the ac-admin > index.php file comment out or remove the lines 109 - 112 which should be these:
Code: Select all
if(isset($warning)){
   $xtra_moo.="
   roar.alert('Information : ','".$warning."');
   ";
}

This will mean that you won't get the messages but I am sure that you can cope with that.
I will try to resolve this problem (possibly be simply removing the alerts from the code) in the next version.

Sorry about this :(

Chris

Thanx for fast replay. OK, I will do that, but still if issue is script or IE, and not server configuration, why I don't have that on my test site? Anywhere I will do what you said. Thanx.
Joe
 
Posts: 5
Joined: Thu May 06, 2010 10:17 am

Re: Freezing IE after admin update!?

Postby chris » Thu May 06, 2010 11:10 am

but still if issue is script or IE, and not server configuration, why I don't have that on my test site? Anywhere I will do what you said. Thanx.

Script or IE.... hard one to answer :(
The same bit of code works elsewhere in the script (and on many other webs) and certainly gives no errors on other browsers. IE in general has a lot of problems but unfortunatley for some strange reason is still the most popular browser used so we have to live with it.

Where you testing on the same browser?
Maybe the charset errors where "preventing" the error actually occuring (not likely).
Did you actually test the admin out fully in your test server?

This error is admittedly a strange one and no amount of testing on my part has been able to resolve it so far :(

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Freezing IE after admin update!?

Postby Joe » Fri May 07, 2010 7:09 pm

chris wrote:
but still if issue is script or IE, and not server configuration, why I don't have that on my test site? Anywhere I will do what you said. Thanx.

Script or IE.... hard one to answer :(
The same bit of code works elsewhere in the script (and on many other webs) and certainly gives no errors on other browsers. IE in general has a lot of problems but unfortunatley for some strange reason is still the most popular browser used so we have to live with it.

Where you testing on the same browser?
Maybe the charset errors where "preventing" the error actually occuring (not likely).
Did you actually test the admin out fully in your test server?

This error is admittedly a strange one and no amount of testing on my part has been able to resolve it so far :(

Chris

Well, about that problem it is OK, now I don't have that freezing thing when I remove few lines what you told me. So that is OK.
Thanx Chris
Joe
 
Posts: 5
Joined: Thu May 06, 2010 10:17 am

Re: Freezing IE after admin update!?

Postby Joe » Sat May 08, 2010 12:58 am

Becaouse my site is XHTML 1.1 strict, I was tested calendar on W3C validator and it seems id of the calender starts with number and not with letter. So how can I put letter before id number which is created out of the month and year of the specific month and year? Also same issue on your demo page.

Line 98, Column 13: value of attribute "id" invalid: "0" cannot start a name

<div id="05_2010" class="cal_month load_cal"></div><div id="6_2010" class="c

It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.


I am talking about code inside ac-includes --> cal.inc.php file.

Code: Select all
$calendar_months.='<div id="'.$this_month.'_'.$this_year.'" class="cal_month load_cal"></div>';


Id must start with letter not with number, so now look something like this for example:

Code: Select all
<div id="04_2007" class="cal_month load_cal"></div>


and it must be something like this

Code: Select all
<div id="April_2007" class="cal_month load_cal"></div>


or for example like this

Code: Select all
<div id="c_04_2007" class="cal_month load_cal"></div>


I have changed that but I had error. It was not good. Do you know solution?

Thanx
Joe
 
Posts: 5
Joined: Thu May 06, 2010 10:17 am

Re: Freezing IE after admin update!?

Postby chris » Sat May 08, 2010 9:11 am

Hi,
If you really need to change that you will need to get into the depths of the javascript code as this id is used to tell the code which month to show.
You could probably use your final example:
Code: Select all
<div id="c_04_2007" class="cal_month load_cal"></div>

and strip the "c_" from the id with javascript.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Freezing IE after admin update!?

Postby Joe » Sat May 08, 2010 9:55 am

chris wrote:Hi,
If you really need to change that you will need to get into the depths of the javascript code as this id is used to tell the code which month to show.
You could probably use your final example:
Code: Select all
<div id="c_04_2007" class="cal_month load_cal"></div>

and strip the "c_" from the id with javascript.

Chris

Thanx for replay, but I don't know how to do that.

This is code what need to be changed.

Code: Select all
//   define id of item to modify
if(isset($_REQUEST["id_item"]))       define("ID_ITEM",   $_REQUEST["id_item"]);   #   id sent via  url, form session etc
else{
   //   define default id manually
   //   define("ID_ITEM",   2);                  
   //   or
   //   get first item from list
   $sql="SELECT id FROM ".T_BOOKINGS_ITEMS." WHERE state=1 ORDER BY list_order ASC LIMIT 1";
   $res=mysql_query($sql) or die("Error checking items<br>".mysql_Error());
   if(mysql_num_rows($res)==0){
      //   no items in db
      $no_id=true;
   }else{
      $row=mysql_fetch_assoc($res);
      define("ID_ITEM",   $row["id"]);
   }
}

if($no_id){
   //   no id - calendar hasn't been set up yet
   $calendar_months='
   <ul>
      <li>You have not yet added any calendar items to the database.</li>
      <li><a href="admin/index.php">Click here</a> to administer your calendar.</li>
   </ul>
   ';
}else{
   //   define start month and year
   $this_year      =   date('Y');   # current year
   $this_month      =   date('m');   # current month
   
   //   create array of months from which to make calendars
   for($k=0; $k<AC_NUM_MONTHS; ++$k){
      
      //   add month layer to page - calendar loaded via ajax
      $calendar_months.='<div id="'.$this_month.'_'.$this_year.'" class="cal_month load_cal"></div>';
      if($this_month==12){
         //   start new year and reset month numbers
         $this_month   =   $this_month=1;   #   set to 1
         $this_year   =   $this_year+1;   #   add 1 to current year
      }else{
         ++$this_month;
      }
   }
}


When I plaice "c" before month id, I get error. Also I am not sure did you call in another part of the script id, so if I change on one plaice, I will change id totaly, so if you called someowhere else this code, it will produce error.
Code: Select all
$calendar_months.='<div id="c_'.$this_month.'_'.$this_year.'" class="cal_month load_cal"></div>';
Joe
 
Posts: 5
Joined: Thu May 06, 2010 10:17 am

Re: Freezing IE after admin update!?

Postby Travelfrog » Fri Jun 24, 2011 12:48 pm

This problem does not yet appear to have been addressed as I downloaded the calendar only yesterday.

I have an XHTML strict website and the id validation errors are still a problem.

Does anyone know which scripts need to be addressed for this to be made valid XHTML?

For valid XHTML id must begin with a letter and not a number.
Travelfrog
 
Posts: 7
Joined: Fri Jun 24, 2011 12:39 pm

Re: Freezing IE after admin update!?

Postby chris » Fri Jun 24, 2011 1:08 pm

Hi,
No the code has not been modified to address this issue.

However you can do it yourself by doing as I described above.
i.e.
Modify the draw_cal() function so that it appends a letter to the calendar month id's like this:

Code: Select all
<div id="c_04_2011" class="cal_month load_cal"></div>

Then adjust the JavaScript code to strip out the "c_" when it retrieves the id.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Next

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron