Page 1 of 1

HTML area widgets not working

PostPosted: Tue Aug 07, 2012 6:51 am
by andperry
Widgets of type 'htmlarea' are not showing up properly from web servers running on my local host computers. I'm using Xataface 1.3.2 on two different platforms:-

Windows XP / Apache 2 / PHP 5.2.17
Ubuntu 12.04 / Apache 2 / PHP 5.3.10

The problem appears on both systems. Here is a paste from the JavaScript error message using Internet Explorer:-

Code: Select all
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)
Timestamp: Tue, 7 Aug 2012 13:29:37 UTC


Message: Permission denied
Line: 25
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/js/fckeditorcode_ie.js


Message: 'FCKConfig' is null or not an object
Line: 27
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/fckconfig.js


Message: Permission denied
Line: 25
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/js/fckeditorcode_ie.js


Message: 'FCKConfig' is null or not an object
Line: 27
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/fckconfig.js


Message: 'FCKBrowserInfo.IsIE' is null or not an object
Line: 58
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/fckeditor.html?InstanceName=current_text&Toolbar=Default


Message: 'FCKBrowserInfo.IsIE' is null or not an object
Line: 58
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/fckeditor.html?InstanceName=new_text&Toolbar=Default


Message: 'FCKConfig.PageConfig' is null or not an object
Line: 34
Char: 1498
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/js/fckeditorcode_ie.js


Message: 'FCKConfig.PageConfig' is null or not an object
Line: 34
Char: 1498
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/js/fckeditorcode_ie.js


Message: 'FCK.ContextMenu' is null or not an object
Line: 107
Char: 158
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/js/fckeditorcode_ie.js


Message: 'FCK.ContextMenu' is null or not an object
Line: 107
Char: 158
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/js/fckeditorcode_ie.js


Message: 'FCKLang' is undefined
Line: 117
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/fckeditor.html?InstanceName=current_text&Toolbar=Default


Message: 'FCKLang' is undefined
Line: 117
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/fckeditor.html?InstanceName=new_text&Toolbar=Default


Message: 'FCKBrowserInfo.IsGecko' is null or not an object
Line: 183
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/fckeditor.html?InstanceName=current_text&Toolbar=Default


Message: 'FCKBrowserInfo.IsGecko' is null or not an object
Line: 183
Char: 1
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/fckeditor.html?InstanceName=new_text&Toolbar=Default


Message: Access is denied.

Line: 39
Char: 975
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/js/fckeditorcode_ie.js


Message: Access is denied.

Line: 39
Char: 975
Code: 0
URI: http://desktop3/All%20Sites/public_html/xataface-1.3.2/lib/FCKeditor/editor/js/fckeditorcode_ie.js



The same code running on the real web sites on a remote host seem to be fine. This seems quite bizarre, expecially as I would have expected to have noticed the problem long ago, unless the problem has somehow just introduced itself.

Any ideas?

Thanks,

Andrew.

Re: HTNL area widgets not working

PostPosted: Tue Aug 07, 2012 9:19 am
by shannah
Check the 2nd parameter of your df_init() function call in your index.php file. Likely it specifies a full URL (with domain name) that is different than the domain that you are accessing your app from. Either change this to be the same, or just change this to be a relative url to the xataface directory.

-Steve

Re: HTML area widgets not working

PostPosted: Wed Aug 08, 2012 6:46 am
by andperry
Thanks Steve for the reply. Problem now fixed.

The problem with a local network is that one might identify a given host by various means, namely the computer name, the IP address or (where server and browser are on the same machine) 'localhost'. I had a quick think about it and realised that the best thing to do would be to construct the Xataface URL using the $_SERVER['SERVER_NAME'] variable. This way it works whatever address you use to access the host.

Andrew.

Re: HTML area widgets not working

PostPosted: Wed Aug 08, 2012 8:50 am
by shannah
You could also just use a relative URL. Eg "xataface"

Steve

Re: HTML area widgets not working

PostPosted: Wed Aug 08, 2012 2:01 pm
by andperry
Fair comment - the relative URL should be OK in the vast majority of cases. My way might be safer in the circumstances as I've got a very complex setup of junction points / symbolic links!!

Andrew.