Jérémy
Hi,


I have a problem when i make my own template. I need to use special tag for ie, but Microweber doesn't like it. I have in firefox the error :

TypeError: mw.tools is undefined

var b = mw.tools.calc.SliderButtonsNeeded(mw.liveEditWYSIWYG.ed);

I tested on Chrome and IE9 too, it doesn't work.

I think i found what is the problem : Microweber delete the end of my tag.

My code in template :
<!--[if lt IE 8]>
       <link href="<?php print TEMPLATE_URL; ?>css/bootstrap-ie7.css" rel="stylesheet">
<![endif]-->

When i see source code of result page, i have the same without <![endif]--> : 

<!--[if lt IE 8]>
<link href="http://site.local/userfiles//templates/myTemplate/css/bootstrap-ie7.css" rel="stylesheet">


Thanks,

Jérémy



Comments for Special balise for IE

  2014-03-28 08:59:51
Hi Jeremy, do you put this tag on the template header?

Can you paste header.php of your template
  2014-03-28 08:59:51
I am investigating now
  2014-03-28 08:59:51
Jeremy I found the bug and fixed it.

Download the dev version and replace the files.

https://github.com/microweber/microweber/archive/dev.zip
Jérémy   2014-03-28 08:59:51
Yes, i put it in my header.php. With the <!-- FIX --> comment, it seems to be better ...

My file :







<!-- Microweber lines -->



<?php if(isset($custom_head)): ?>
<?php print $custom_head; ?>
<?php endif; ?>
<!-- End Microweber lines -->

css/bootstrap.css">
css/bootstrap-theme.css">
css/main.css">

<!--[if lt IE 8]>
css/bootstrap-ie7.css" rel="stylesheet">
<![endif]-->
<!-- FIX -->
  2014-03-28 08:59:51
Just replace the system files in the src folder from the ones in this zip https://github.com/microweber/microweber/archive/dev.zip abd it will work with the original tags
Jérémy   2014-03-28 08:59:51
I have replace src folder : i have now errors like TypeError: $(...).dataset is not a function from api.js line 10 : var data = $(el).dataset(a); and TypeError: el.dataset is not a function in style_editors.js line 214. I clear the cache of my browser and Microweber.

And my end tag is already deleted ?
  2014-03-28 08:59:51
strange... i uploaded a fix
https://github.com/microweber/microweber/archive/dev.zip

Please replace all files


Also have you included jqeury?

If so this may happen jquery being replaced.
Jérémy   2014-03-28 08:59:51
Hi,

To be sure, i created a new project with your dev zip, and a new database. The <![endif]--> is always deleted.

Thanks,

Jérémy
  2014-03-28 12:01:32
Hi Jeremy,

now i will do the same and investigate
  2014-03-28 12:01:32
Hi Jeremy the conditional tags are working
http://lab.microweber.com/test/microweber-dev/blog

See them at view source

Just pushed new changes to the dev branch at github https://github.com/microweber/microweber/archive/dev.zip
Jérémy   2014-03-28 12:01:32
Ok. It works :)

But only if you have one tag.

If you have :
<!--[if lt IE 9]>

<![endif]-->
<!--[if lt IE 8]>
css/bootstrap-ie7.css" rel="stylesheet">
<![endif]-->
Only the second end tag id deleted.
  2014-03-28 12:01:32
Strange...

The IE 9 tag is there too

Check here lab.microweber.com/test/microweber-dev/blog



<!--[if lt IE 9]>
css/style.css" type="text/css" />
<![endif]-->
<!--[if lt IE 8]>
css/style.css" type="text/css" />
<![endif]-->


It just removes the tags if they are emplty like <!--[if gte mso 9]><![endif]-->

Are you sure you replaced all files
Jérémy   2014-03-28 14:28:23
I created an other new project with a new database, and your default template. In my last comments, your system delete some parts (maybe for security).

When i paste your example in my project, it works.

My IE9 tag is with js file, like it :
<!--[if lt IE 9]>
s c r i p t s r c = "http://localhost/mw3/userfiles//templates/default/js/main . j s " / s c r i p t <![endif]-->

Thanks a lot ;)
  2014-03-28 14:28:23
hope it works Jeremy , releasing new update with some fixes after few hours
Jérémy   2014-03-28 14:28:23
Have you try with script tag in an IE tag ? It doesn't seems to work (but it works with css link).
  2014-03-28 14:28:23
This is because you are trying to add <script> tag in editable field?

The scripts are removed for safety from "edit" fields.... can you paste your code at https://gist.github.com/ so i can check it out
  2014-03-31 12:34:16
I see it now... looking for the bug
  2014-03-31 12:34:16
Hi Jeremy i fixed the bug. Download the files from https://github.com/microweber/microweber/archive/dev.zip and it should work on your end
Jérémy   2014-03-31 12:34:16
Yes, it works. Thank you so much !!
Jeremy
  2014-03-31 12:34:16
Hi Jeremy I made some more fixes on the template parsing and we also added new template.

You can test is from here

https://github.com/microweber/microweber/archive/master.zip
You have to log in or register to post a comment: