Hi,
I get an error on page load whenever PNG Behave tries to do it's thing in IE6. I'm using version 5.x-1.7.
See here: http://screencast.com/t/q03KCD5DHI

Cheers,
Matthew

Comments

mrjeeves’s picture

your browser seems to reporting a previous error, please post all errors occurring prior to the one you posted so I can backtrace the issue. Thank you for your time and testing.

mrjeeves’s picture

Assigned: Unassigned » mrjeeves
Status: Active » Postponed (maintainer needs more info)
mshepherd’s picture

Hi,
The error I got was from a fresh install of PNG Behave & it the only error I noticed.
I'll start up XP in a minute and get ie6 running and check I didn't miss anything,
Thanks for your reply! I'll be back in touch
Matthew

mshepherd’s picture

Here goes:

  1. A runtime error has occurred. Do you wish to debug?
    Line: 11, Error: Expected '/'
  2. I hit Yes and a bebugger opens (not at all familiar with javascript or the debugger...)
  3. The debugger finds an error on the line : IEPNGFix.blankImg = Drupal_base_path + 'sites/all/modules/...
    The error is : Microsoft JScript runtime error: 'Drupal_base_path' is undefined'

I've also just noticed that your definition of where the module lives is not correct in my case. Although modules that are globally available are kept in the /sites/all directory, I generally store modules in /sites/sitename/modules. Is that an easy fix for you?

Thanks for the v5 branch of the module & I hope you can get it going for me without too much effort! Cheers

Matthew

mrjeeves’s picture

StatusFileSize
new1.67 KB

I had a feeling this may become an issue, try this patch and let me know.

mrjeeves’s picture

Status: Postponed (maintainer needs more info) » Needs review
mshepherd’s picture

Hey mrjeeves. I'll try that in the morning. My colleague owes me some training on what to do with patch files! Now's as good a time as any to learn. Thanks for your time and I'll be back in touch soon,
Cheers

mrjeeves’s picture

for future reference, you can view patch files in notepad or some similar reader and see exactly what changes the patch makes. in this case, it changes a line in iepngfix.htc and a line in pngbehave.module. thanks again for the testing, let me know if the changes work.

mshepherd’s picture

Thanks for your notes about patches.
I've applied the patch and I still get an error, although slightly different:

The html contains the following code:

<!--[if lt IE 7]>
         <script type="text/javascript">
           document.execCommand("BackgroundImageCache", false, true);
           var BlankImgPath = /sites/www.evcwm.org.uk/modules/pngbehave;
				</script>
        <style type="text/css">img, li, ul { behavior: url(/sites/www.evcwm.org.uk/modules/pngbehave/iepngfix.htc)} </style>
        <script type="text/javascript" src="/sites/www.evcwm.org.uk/modules/pngbehave/iepngfix_tilebg.js"></script>
    <![endif]-->

Which contains the correct path to the pngbehave module. Cheers for that.

I still got the same variable underfined error. However, I modified the htc file a little (seee below):

 16 //IEPNGFix.blankImg = BlankImgPath + '/blank.gif';
 17 IEPNGFix.blankImg = '/sites/www.evcwm.org.uk/modules/pngbehave/blank.gif';

So, I hard coded the blankimage path. Good news, it worked & transparency has returned to my images - hopefully, that gives you something to go on. However, I still get an error on line 11: Expected ';'

Am I making sense?!

Thanks again for your help,

Matthew

mrjeeves’s picture

StatusFileSize
new0 bytes

looks like i forgot some quotes, try this one and see if it works better

This patch is written against the 5.x-1.7 version freshly installed

mshepherd’s picture

Hi,
The patch file you uploaded has zero size.
Matthew

mrjeeves’s picture

StatusFileSize
new1.67 KB

sorry about that try it now

mrjeeves’s picture

Status: Needs review » Fixed

The patch has been committed to the 5.x-1.8 official release, marking as fixed.

mshepherd’s picture

Apologies for not responding over the weekend. I've been away. I'll test later today and post back. But thanks for your time.
Best regards,
Matthew

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.