The day before holiday closing, a customer who recently we developed a web site calls me and say "Do you see our web site? Is impossibile to print due an error on script xyz"

On a firtst moment I got down from the clouds, also because AFAIK the print function is totally idipendent from the web site showed. In addition, customer wasn't using a custom print button, but that one in the IE toolbar.

Since it was the day before holidays, both customer and us decided to shift the debug till today when we re-opened our office. Capture

After some tests (IE 7, Firefox, Safari, Opera), I wasn't able to repro the error, so in a first moment I thought to a problem connected to it's computer (also becuase that machine was recently infected by a virus) . But after a while, I think to his pc, an XP Sp2 with a slow Internet connection and so to the fact that he never update his pc with IE 7. So I open the virtual machine, load the XP Sp2 and ... patatrac. Get the error.

Line 1401, then line 1200 ... and so on. Lines that obviously wasn't into html code that was just 100 rows. So the error couldn't be in the html file (at least it wasn't seem) also because the file was XHTML and CSS valid. But unfortunately the error was in every page, and get sistematically every time I was pressing the print button.

After some google research and some possible solutions like corrupted file (impossible to understand if file article speaks was the html file or IE file), unrealistic dll registration, I start to clear small parts of html code until I delete a div tag which id param was setup to tags. That was the matter: simply renaming the tag and magically all start back to work.

Once again a prove that IE should be trashed.

Technorati Tags: ,

Vota questo post per primo

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Il giorno prima della mia partenza per le ferie, mi chiama un cliente al quale recentemente gli abbiamo realizzato un sito internet e mi dice "Sai, se premo il tasto stampa, mi viene fuori una finestra d'errore che dice 'Errore nello script ecc. ecc.'".

Sulle prime cado dalle nuvole, anche perchè da che mondo e mondo, la funzione di stampa è indipendente dal sito internet, tanto più che non si trattava nemmeno di un tasto nel sito, ma della funzione nativa di Internet Explorer.

Essendo il giorno prima delle vacanze, il cliente ha compreso la situazione ed abbiamo rimandato ad oggi - giorno di riapertura - il "debug".Capture

Dopo alcune prove (IE 7, Firefox, Safari, Opera), io non riesco a riprodurre l'errore, quindi penso che sia qualche casino legato alla sua macchina che un tempo era infetta. Poi penso pure al suo pc, XP Sp2 con connessione Internet da tartaruga e quindi al fatto che lui aveva IE 6. Quindi apro la virtual machine, apro il sito, tasto stampa e ... patatrac. Ecco li l'errore.

Linea 1401, poi linea 1200 ... e via dicendo. Linee che ovviamente non erano presenti dentro al codice html di poco più di 100 righe. Quindi l'errore non poteva essere (almeno apparentemente) nel mio codice, anche perchè era XHTML e CSS valido. Eppure l'errore si ripresentava sistematicamente in tutte le pagine del sito, quindi era qualcosa dentro alla pagina.

Dopo alcune ricerche e soluzioni delle più assurde come file corrotto (non si capiva nemmeno quale se l'html o quello di IE), fantomatiche riregistrazioni della dll incriminata, inizio allora a smontare la pagina, cancellando blocchi di codice fino a quando non arrivo a scoprire che un tag div il cui id impostato a tags creava il problema. Rinominato quel tag, tutto ha iniziato magicamente a funzionare.

L'ennesima riprova di quanto IE 6 sia tutto da buttare.

Technorati Tags: ,

Vota questo post per primo

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Advanced Technology

Abruzzo SEO specialist, .Net programming and computer stuff