HELP: IE Error with Contribution Plugin page

27 views
Skip to first unread message

Jeanne

unread,
Nov 13, 2009, 11:42:19 PM11/13/09
to Omeka Dev
Has anyone seen issues with the contribution plugin with IE?

Take a look at this page with IE: http://www.caseyfeldmanmemories.org/share

I see a popup error message that says: "Internet Explorer cannot open
the Internet site http://www.caseyfeldmanmemories.org/share. Operation
aborted."

Help! I worry now that we are loosing lots of contributions due to
this error.

It works FINE in firefox!

Thanks,
Jeanne

Jeremy Boggs

unread,
Nov 13, 2009, 11:52:07 PM11/13/09
to omek...@googlegroups.com
Never in my life have I encountered such an error. What version of
Internet Explorer?

It looks like you're loading Prototype and Scriptaculous, and a few
other scripts, twice in your header. I'm wondering if the scripts for
the Lightbox are somehow causing this error. I'd try removing the
scripts for the Lightbox first, to see if this is a JavaScript
conflict. If not, we'll try something else.

Jeremy

Jeanne

unread,
Nov 14, 2009, 12:13:56 AM11/14/09
to Omeka Dev
The IE version in my case is 7.0.

Can I remove the lightbox scripts just for this form since clearly I
don't have any images on this page? Or do I need to yank it across the
site?

Jeanne

On Nov 13, 11:52 pm, Jeremy Boggs <jer...@clioweb.org> wrote:
> Never in my life have I encountered such an error. What version of  
> Internet Explorer?
>
> It looks like you're loading Prototype and Scriptaculous, and a few  
> other scripts, twice in your header. I'm wondering if the scripts for  
> the Lightbox are somehow causing this error. I'd try removing the  
> scripts for the Lightbox first, to see if this is a JavaScript  
> conflict. If not, we'll try something else.
>
> Jeremy
>
> On Nov 13, 2009, at 11:42 PM, Jeanne wrote:
>
>
>
> > Has anyone seen issues with the contribution plugin with IE?
>
> > Take a look at this page with IE:http://www.caseyfeldmanmemories.org/share
>
> > I see a popup error message that says: "Internet Explorer cannot open
> > the Internet sitehttp://www.caseyfeldmanmemories.org/share. Operation

Jeanne

unread,
Nov 14, 2009, 9:14:39 AM11/14/09
to Omeka Dev
Ok.. 1st test shows you are right. I commented out the lightbox
javascript includes at the top and now it works fine in IE.

Thanks so much for the pointer. Now I will fiddle with the scripts and
see if I can get lightbox and the contribution plugin to play well
together.

Jeanne

Jeanne

unread,
Nov 14, 2009, 9:40:20 AM11/14/09
to Omeka Dev
So here is my dilemma - if I update:
/application/helpers/FileFunctions.php

so that this line:
function js($file, $dir = 'javascripts', $scriptaculousLibraries =
array('effects', 'dragdrop'))

becomes:
function js($file, $dir = 'javascripts', $scriptaculousLibraries =
array('effects', 'dragdrop','builder'))

It changes the code in the header to:
<script src="http://www.caseyfeldmanmemories.org/application/views/
scripts/javascripts/scriptaculous.js?load=effects,dragdrop,builder"
type="text/javascript" charset="utf-8"></script>

Now the lightbox is happy, but the Contribution plugin is broken
again.
Any thoughts? Is this even valid? Or am I breaking some rule of
javascript by trying to load all 3?

For now I set it back to just working for the Contribution plugin.

Is there a way to set that part of the header differently depending on
the page I am displaying?

Thanks!
Jeanne

On Nov 14, 12:13 am, Jeanne <jkramersm...@gmail.com> wrote:

Wayne Graham

unread,
Nov 14, 2009, 3:07:04 PM11/14/09
to Omeka Dev
Accidentally responded directly, but I'm pasting the response here
too...
=========

Is this still an IE thing? We worked on a project recently that made
us swear off Prototype and scriptaculous forever because of weirdness
in the IE browsers. What we found is that IE actually implements DOM
completely differently than all other browsers, even names elements
and functions differently (and in a few instances, uses different
order of attributes in function calls). What it basically boiled down
to is that you can deliver the IE5 experience if you don't properly
provide the correct doctype switching and validation calls. Even more
complicating is the fact that there's IE 7 Standards mode, IE 8 quirks
mode, and IE 8 standards mode which for all intents and purposes are
different browser engines and will display your pages differently.

First thing to try is to add in the X-UA-Compatible header (you can do
it in a meta tag too):

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

That should get IE8 to render like IE7, which is a first step in
getting all these kinks worked out. The second part is to get the dev
toolbar to check out the DOM and see if there's an issue in there. If
you've written any custom JS.

Lastly, which version of Prototype are you using? We found that the
release candidates for 1.6.1 were working better for us. Try updating
to the latest version at http://prototypejs.org/assets/2009/8/31/prototype.js
and see if there's a change in the behavior.

HTH,
Wayne

Jeanne

unread,
Nov 15, 2009, 1:02:18 AM11/15/09
to Omeka Dev
Wayne,

Thanks for the pointers. I will do my best - but I admit that I am not
fluent in the ins and outs of javascript. I just want to find a way to
get lightbox and the contribution plugin to play well together in
IE :)

Jeanne

On Nov 14, 3:07 pm, Wayne Graham <wayne.gra...@gmail.com> wrote:
> Accidentally responded directly, but I'm pasting the response here
> too...
> =========
>
> Is this still an IE thing? We worked on a project recently that made
> us swear off Prototype and scriptaculous forever because of weirdness
> in the IE browsers. What we found is that IE actually implements DOM
> completely differently than all other browsers, even names elements
> and functions differently (and in a few instances, uses different
> order of attributes in function calls). What it basically boiled down
> to is that you can deliver the IE5 experience if you don't properly
> provide the correct doctype switching and validation calls. Even more
> complicating is the fact that there's IE 7 Standards mode, IE 8 quirks
> mode, and IE 8 standards mode which for all intents and purposes are
> different browser engines and will display your pages differently.
>
> First thing to try is to add in the X-UA-Compatible header (you can do
> it in a meta tag too):
>
> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
>
> That should get IE8 to render like IE7, which is a first step in
> getting all these kinks worked out. The second part is to get the dev
> toolbar to check out the DOM and see if there's an issue in there. If
> you've written any custom JS.
>
> Lastly, which version of Prototype are you using? We found that the
> release candidates for 1.6.1 were working better for us. Try updating
> to the latest version athttp://prototypejs.org/assets/2009/8/31/prototype.js

Jeremy Boggs

unread,
Nov 15, 2009, 1:26:42 PM11/15/09
to omek...@googlegroups.com
On Nov 14, 2009, at 9:40 AM, Jeanne wrote:

So here is my dilemma - if I update:
/application/helpers/FileFunctions.php

so that this line:
function js($file, $dir = 'javascripts', $scriptaculousLibraries =
array('effects', 'dragdrop'))

You don't need edit this in the FileFunctions.php file directly. Instead, when you call the js() function in your theme's header.php file, you should pass different arguments to it, like this:

<?php echo js('scriptaculous', 'javascripts', array('effects', 'dragdrop', 'builder'); ?>

This will accomplish exactly what you were doing in FileFunctions.php. Its better to just send the appropriate arguments to the function in your theme directly instead of modifying core functions, when possible. That way, when you do upgrades, you won't lose your work, since the FileFunctions.php will be replaced when doing upgrades. This is a good rule to follow in general. If you find you have a need to edit a core helper function, its probably better to post about it here and see if someone can provide alternative solutions to editing the core. If I need a core helper function to do something it can't currently do, I create a new function in themes/mytheme/custom.php based on the core function, and add that functionality there. Then I can use that new function anywhere in my theme.

For now I set it back to just working for the Contribution plugin.

Is there a way to set that part of the header differently depending on
the page I am displaying?

It seems like this list of javascript files, in this order, should work:
<!-- JavaScripts -->
<script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascripts/prototype.js" charset="utf-8"></script>
<script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascripts/prototype-extensions.js" charset="utf-8"></script>
<script src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascripts/scriptaculous.js?load=effects,dragdrop,builder" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascripts/search.js" charset="utf-8"></script>
<script type="text/javascript" src="http://www.caseyfeldmanmemories.org/themes/thanksroy/common/lightbox/js/lightbox.js"></script> 
To write this out using the js() helper in Omeka, you should be able use the following:
	<?php echo js('prototype'); ?>
	<?php echo js('prototype-extensions'); ?>
	<?php echo js('scriptaculous', 'javascripts', array('effects', 'dragdrop', 'builder'); ?>
	<?php echo js('search'); ?>
	<?php echo js('lightbox', 'common/lightbox/js'); ?>
For the last 'lightbox' file, I'm providing a different value for the second argument, which is the directory where the script is located, which, from what I can tell in your cide is in 'themes/thanksroy/common/lightbox/js'. I think this should work, but don't have the scripts handy to test this myself.
It may also be possible to write some kind of conditional statement in the header, and add those scripts for specific views. I'll see if this is possible, and provide a solution if I find one. That would be ideal, since you really don't need to add the lightbox javascript to all the pages in your theme. Same for the others. Ideally, the lightbox plugin, or any plugin for that matter, would only insert the necessary scripts to the header on the pages that need it. I'm not sure offhand if its possible for plugins to specify specific views when they use that plugin_header hook, but will look it.
Best,
Jeremy

Jeremy Boggs

unread,
Nov 15, 2009, 1:31:23 PM11/15/09
to omek...@googlegroups.com
This is a good point, Wayne. This would also make IE8 behave like IE7
for CSS too, however, which could lead to some potential styling
issues. But I find it way easier to fix CSS stuff for Internet
Explorer 7 than to fix JavaScript stuff. :)

Jeremy

Jeanne

unread,
Nov 22, 2009, 1:14:45 AM11/22/09
to Omeka Dev
Jeremy,

Just tried your suggestion - and this line (needed to add another
close paren to get it to not spit back errors):
<?php echo js('scriptaculous', 'javascripts', array
('effects','dragdrop','builder')); ?>
generates this code:
<script type="text/javascript" src="http://
www.caseyfeldmanmemories.org/application/views/scripts/javascripts/scriptaculous.js"
charset="utf-8"></script>

Shouldn't this have a src value of this?
"http://www.caseyfeldmanmemories.org/application/views/scripts/
javascripts/scriptaculous.js?load=effects,dragdrop,builder"

Thoughts?

Thanks so much!
Jeanne
> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr...
> " charset="utf-8"></script>
> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr...
> " charset="utf-8"></script>
> <script src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr...
> " type="text/javascript" charset="utf-8"></script>
> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr...
> " charset="utf-8"></script>
> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/themes/thanksroy/common/lightbox/...

Jeremy Boggs

unread,
Nov 22, 2009, 9:50:19 AM11/22/09
to omek...@googlegroups.com
Jeanne:

I assume its not working for you because you're using Omeka 1.0 or
earlier. In 1.0, the js() function would only accept the effects
parameter if you used 'default' as the first parameter for the file,
and not if you 'scriptaculous' specifically. We fixed the js()
function in Omeka 1.1 to allow for this. If you upgrade to Omeka 1.1,
the code I sent in my last email should work fine.

If you want to stay on 1.0 for whatever reason, you should be able to
do this to load the 'builder' effect for scriptaculous using this:

<?php echo js('default', 'javascripts', array('effects', 'dragdrop',
'builder')); ?>

This should output:

<script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascripts/prototype.js
" charset="utf-8"></script>
<script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascripts/prototype-extensions.js
" charset="utf-8"></script>
<script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascripts/scriptaculous.js?load=effects,dragdrop,builder
" charset="utf-8"></script>

This should work in 1.1 as well. Looking at it now, there isn't a
reason to declare prototype, prototype-extensions, and scriptaculous
in their own js() function separately, since passing 'default' as the
first parameter to the js() function will load all three of those.

Hope this helps,
Jeremy
>> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/themes/thanksroy/common/lightbox/
> --
>
> You received this message because you are subscribed to the Google
> Groups "Omeka Dev" group.
> To post to this group, send email to omek...@googlegroups.com.
> To unsubscribe from this group, send email to omeka-dev+...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/omeka-dev?hl=
> .
>
>

Jeanne

unread,
Nov 22, 2009, 2:42:15 PM11/22/09
to Omeka Dev
Jeremy,

You are correct - I am still on 1.0.
Since my site is live, I was nervous about doing an in place upgrade
unless I saw issues I was needing to fix.

The good news is that the line you gave me above worked fine.

The bad news is that as soon as I added the line below back in, the
Contribute page dies on IE again:
<?php echo js('lightbox', 'common/lightbox/js'); ?>

This is what that line generated in the HTML:
<script type="text/javascript" src="http://
www.caseyfeldmanmemories.org/themes/thanksroy/common/lightbox/js/lightbox.js"
charset="utf-8"></script>

Maybe this takes us back to my question about not including that line
on the contribution/share page?

Other thoughts?
Jeanne

On Nov 22, 9:50 am, Jeremy Boggs <jer...@clioweb.org> wrote:
> Jeanne:
>
> I assume its not working for you because you're using Omeka 1.0 or  
> earlier. In 1.0, the js() function would only accept the effects  
> parameter if you used 'default' as the first parameter for the file,  
> and not if you 'scriptaculous' specifically. We fixed the js()  
> function in Omeka 1.1 to allow for this.  If you upgrade to Omeka 1.1,  
> the code I sent in my last email should work fine.
>
> If you want to stay on 1.0 for whatever reason, you should be able to  
> do this to load the 'builder' effect for scriptaculous using this:
>
> <?php echo js('default', 'javascripts', array('effects', 'dragdrop',  
> 'builder')); ?>
>
> This should output:
>
> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr...
> " charset="utf-8"></script>
> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr...
> " charset="utf-8"></script>
> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr...
> " charset="utf-8"></script>
>
> This should work in 1.1 as well. Looking at it now, there isn't a  
> reason to declare prototype, prototype-extensions, and scriptaculous  
> in their own js() function separately, since passing 'default' as the  
> first parameter to the js() function will load all three of those.
>
> Hope this helps,
> Jeremy
>
> On Nov 22, 2009, at 1:14 AM, Jeanne wrote:
>
> > Jeremy,
>
> > Just tried your suggestion - and this line (needed to add another
> > close paren to get it to not spit back errors):
> >        <?php echo js('scriptaculous', 'javascripts', array
> > ('effects','dragdrop','builder')); ?>
> > generates this code:
> >        <script type="text/javascript" src="http://
> >www.caseyfeldmanmemories.org/application/views/scripts/javascripts/sc...

Jeremy Boggs

unread,
Nov 22, 2009, 8:24:45 PM11/22/09
to omek...@googlegroups.com
Jeanne:

From looking into this a bit more, it seems like the best solution
would be to include the javascript for the lightbox only on pages
where you can view images in the lightbox, instead of hiding it from
the contribution form. I'll assume that, for now, this is only on the
items/show.php template page, but this really could work in post
template files:

In items/show.php, add 'javascript' => js('lightbox', 'common/
lightbox/js') to the array inside the head() function, like so:

<?php head(array('javascript' => js('lightbox', 'common/lightbox/
js'))); ?>

You can put this before or after other values in that array if you
have some in there. (Most times our themes have a 'bodyclass' or
'bodyid' defined.) This will set a variable called $javascript that
can be echoed in header.php. After adding the above code, open
header.php in your template, then add the following below your other
javascripts:

<?php echo $javascript; ?>

This will echo that lightbox js file only on the items/show page. If
you need to add it to other template files, like items/browse.php or
whatever, just edit those files and add the same code to the head()
function.

Defining variables in the head() function is a pretty useful way of
adding custom code to the header from other template files.

Best,
Jeremy
>> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr
>> ...
>> " charset="utf-8"></script>
>> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr
>> ...
>> " charset="utf-8"></script>
>> <script type="text/javascript" src="http://www.caseyfeldmanmemories.org/application/views/scripts/javascr
>> ...
>> " charset="utf-8"></script>
>>

Jeanne

unread,
Nov 23, 2009, 2:19:38 AM11/23/09
to Omeka Dev
Jeremy,

Thank you for all the help. We have success!

Not only that - but I am intrigued to experiment more with the
template specific setting of values in the header. I suspect a similar
approach should let me put a custom meta description in for different
pages. I will let you know what success I have with it.

Thanks again - I am so pleased to have both our contribution page and
lightbox working at the same time!

Jeanne
> >www.caseyfeldmanmemories.org/themes/thanksroy/common/lightbox/js/ligh...

Jeremy Boggs

unread,
Nov 23, 2009, 12:31:38 PM11/23/09
to omek...@googlegroups.com
Absolutely. Basically, you can define any variable in that head()
function (and foot() function, for that matter), then echo those
values in header.php where appropriate. Its a pretty handy approach,
one that I don't think we have used as much as we could.

Jeremy

Jeanne

unread,
Nov 23, 2009, 2:55:44 PM11/23/09
to Omeka Dev
I would love Simple Pages to support a meta description, either based
on a sub-string of the page text or using a new attribute. With this
new approach I see how. Would it be better to create a new SEO Page
plugin? Or offer an enhancement to the existing Simple Pages plugin?

Jeanne
> ...
>
> read more »

Jeremy Boggs

unread,
Nov 24, 2009, 2:09:59 PM11/24/09
to omek...@googlegroups.com
What I'd like to do is, in a future version of SimplePages, make it
possible for theme writers to create page templates that SimplePages
could use. Then, theme writers could add any tags to its header that
they wanted to in that page template. I think this would be more
flexible than adding a specific field to SimplePages just for a
description meta tag.

Thoughts?

Jeremy

Jeanne

unread,
Nov 24, 2009, 10:44:38 PM11/24/09
to Omeka Dev
How about Simple Page Types - in the same manner as you have Item
Types?

That, combined with a page template would make it super easy to
support creation of pages that are not items, but still have things
like custom meta descriptions or images or other attributes.

Use cases:
- artist profile page with photo
- addition of custom meta description per page
- clever embedding of things like timelines or maps, based on
structured bits of data set in the page.

It would also be neat to be able to associate a simple page with an
item by supporting an attribute type of 'Simple Page' that can be
associated with an Item type. When creating an item of this new Item
Type, the values available for a Simple Page attribute would be a list
of all existing Simple Pages.

What do you think?

Jeanne
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages