Recent Topics

1 Jun 23, 2008 22:43    

In 2.4.2 when the bookmarklet is used, the following code gives an permission denied exception in firefox on the bold part of the following code:

		if( window.opener
			&& [b]window.opener.b2evo_Callbacks[/b]
			&& ( typeof window.opener.b2evo_Callbacks != "undefined" ) )
		{ // callback in parent document (e.g. "Files" popup)
			if( window.opener.b2evo_Callbacks.trigger_callback( "wrap_selection_for_"+myField.id, hook_params ) )
			{
				return;
			}
		}


Read here for more info:
http://forums.b2evolution.net/viewtopic.php?t=15898

I've developed a little fix that fixes this problem. Just replace the above pasted code with the following code in functions.js:


	//It appears that in the bookmarklet in firefox window.opener not is null. 
	//Unfortunately firefox does not allow any reading / writing from the 
	//window.opener object and gives an Persmission Denied error.
	//to avoid this error being raised, check if we are in bookmarklet mode
	//and disable the opener access instead.
	if (window.location.toString().indexOf('&mode=bookmarklet') ==-1) {
		if( window.opener
			&& window.opener.b2evo_Callbacks
			&& ( typeof window.opener.b2evo_Callbacks != "undefined" ) )
		{ // callback in parent document (e.g. "Files" popup)
			if( window.opener.b2evo_Callbacks.trigger_callback( "wrap_selection_for_"+myField.id, hook_params ) )
			{
				return;
			}
		}
	}

3 Aug 05, 2008 23:27

Well I don't think so because you are still using an old 1.10 version. I had the same errors earlier, but they seem to have fixed your error you report for 1.10 in the newer version. So I would suggest to upgrade! It is fairly easy, and much better version. So why don't you just upgrade?

4 Aug 06, 2008 00:27

No, I'm using 2.4.2 and that error still appears.


Form is loading...