Permission denied to access property 'CKEDITOR' - javascript

I have integrated CKEditor and CKFinder in my sites. All worked well. But now on one of my sites there is a problem. Firebug shows:
Error: Permission denied to access property 'CKEDITOR'
I use the next code for integration:
CKFinder.setupCKEditor( null, 'ckfinder/' );
$( 'textarea.tarea_ckeditor' ).ckeditor();
What can be the problem here?

Follow the steps bellow:
Check the URL from the browser (maybe you are on the dev website) :D
Check, if the files and your page is on the same domain (they should be).
Do you make any redirects on the server (append www or even on another domain)?

Related

Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document [duplicate]

Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
No clue how to go further on this...when all I did was `
Works in Firefox, not in Chrome.
Could be something related to http://help.twitch.tv/customer/portal/questions/6299203-javascript-errors-in-chrome-
I had the same problem with localStorage, and fixed it like this :
Under Settings > Privacy > Content settings, change the cookies' settings to "Allow local data to be set" or the second option (in my case, it was previously on "Block sites from setting any data").
Edit
On newer Chrome versions, make sure the first option is ticked here: chrome://settings/content/cookies
I had the same issue, but my problem was a script blocking plug-in ScriptBlock that I had set to allow the site but was still blocking some actions and not reporting it.
Disabled the script blocker and voila!
If you still want to block most 3rd party cookies, you can add an exemption. I usually can do it through the cookie button that pops up in the AddressBar, but it wouldn't let me for localhost. I had to add it via chrome://settings/content/cookies Picture of chrome://settings/content/cookies
For the latest chrome browser, this might work and better guide for you. And it works for me.
Settings > Privacy and security > Cookies and other site data > Allow all cookies
That should work perfectly.

Chrome: Notifications not working, permission not requested

I have been struggling for hours on trying to enable notifications on chrome, on firefox it works perfectly and it works ok as well on localhost url address. But when it comes to non-localhost url address it just doesn't work.
i have been checking on the permissions that are displayed left next to the url input box where you see the website's information and it shows that notifications are permitted, but on advanced settings it shows block with a message "Blocked to protect your privacy" and i am not entirely sure what does that mean.
the code i am trying to execute first is simple:
if(Notifications.permission == "default"){
Notification.requestPermission()
.then(permission => {
console.log(`Permission given is: ${permission}`);
});
}
else{
console.log("Notification permission is: ${Notification.permission}`);
}
The result of this code is Notification permission is: denied meaning that else statement was executed but permission is given as if permission was already requested and denied was the answer of the request.
Can someone explain why does this happen?
I figured out that the problem was comming from loading the website with no TLS https, making some features in chrome to be disabled by design..
I was unabled to figure this out sooner because the host testing i was using was being accessed with 0.0.0.0 instead of localhost which is the one that chrome whitelists for features

Facebook iFrame security error (document.domain) raised by hasPasswordField_

We have a project that use standard Facebook API used mainly for login and registration purpose.
Since we use Sentry to receive error notification, the following one (in home page) occurs often:
SecurityError: Blocked a frame with origin "https://www.mywebsite.com" from accessing a
frame with origin "https://www.facebook.com". The frame being
accessed set "document.domain" to "facebook.com", but the frame requesting access did not.
Both must set "document.domain" to the same value to allow access.
at hasPasswordField_ (/en:1:368)
at hasPasswordField_ (/en:1:499)
at findPasswordForms (/en:1:173)
at global code (/en:10:27)
It's strange because the methods
hasPasswordField_ / findPasswordForms
don't exist on the project code.
Because the error currently occurs only on
iOS Chrome Mobile, version: 59.0.3071 | 60.0.3112
There is a Chrome internal component that is trying to access to the Facebook iFrame or is Facebook searching for some password fields on the webpage?
UPDATE:
After a further search, I found this post on Sentry GIT page:
https://github.com/getsentry/sentry/issues/5267
they suggest simply to ignore the error.
Any idea how to face it differently?
Any help will be appreciated!
It says here that the bug has been fixed in version 61. https://crbug.com/709132

Unable to use postMessage within cordova

In our cordova/phonegap-app we're using an iFrame to load external websites. To communicate with the iFrame-content I've created a script for both sites (App and Website) which uses iFrame.contentWindow.postMessage()-method. The reason is to open external links within the iframe in the system-browser of the smartphone. This solution worked fine on cordova 2.3.0.
Today I've updated the cordova version of the app to 3.1.0 and deleted some permissions from android-manifest. But the communication with the iFrame-content doesn't work. Following error error-message is shown:
"Unable to post message to https://[domain]. Recipient has origin file://"
To post a message to the IFrame I use following code:
$('#webViewIFrame').get(0).contentWindow.postMessage('message', host);
Has anybody an idea why my communication-solution doesn't work with cordova 3.1.0?
Normally this should be because of cross domain problem. Try using this:
$('#webViewIFrame').get(0).contentWindow.postMessage('message', '*');
You will need to use:
$('#webViewIFrame').get(0).contentWindow.postMessage('message',"*");
Since phonegap/cordova pages are served at "file://" and according to https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
"...posting a message to a page at a file: URL currently requires that the targetOrigin argument be "*". file:// cannot be used as a security restriction; this restriction may be modified in the future."

Magento install copied - admin menu doesn't work

I cloned an existing magento 1.7.2 installation on the same server with a test subdomain. The frontend seems to work, and I can login to the admin. The admin menu doesn't work however, no dropdowns, and copying url paths doesn't work either. I've searched online, and most answers date back to 2008 and suggest that it's a rights issue. So I've changed the rights of folders and files to 755 and 644, but still no working menus. The cache (var/cache) is empty.
These menus are javascript generated. The following error message is from the console:
Error: TypeError: Element.addClassName is not a function
To be clear - the solution is not in javascript, but it's something on the server. This install works on the same server in another directory with another domain.
Any ideas how to fix this?
The error
Error: TypeError: Element.addClassName is not a function
indicates some javascript on your page can't call the addClassName method.
The addClassName method is added to element via the prototype javascript framework.
That means its very likely your browser can't download the prototype.js file. Since it can't download this file, the addClassName method is never defined, and you get the error you're seeing.
Look at the source code of your admin pages and find the script tag that includes the version of prototpye shipped with your version of Magento.
<script type="text/javascript" src="http://magento.example.com/js/prototype/prototype.js"></script>
Take the URL from this script tag and load it in your browser.
My guess is you'll get a 404 because the file is missing, or a forbidden error because the file has incorrect permissions, or some other web server error that prevents the file from being shown. It's also possible that the link is pointing to an older domain name that's based on a value configured or cached in Magento.
Track down the source of that problem, and you'll be good to go.
Another reason could be that the skin and CSS rules are not correct for your environment.
I've just moved a site from live to local, and the skin/css/media were configured to a subdomain so I looked in the core_config_data table and updated the URLs
Please check if you have set merge js or css to yes, you can update this via db if you cant do it via menu:
SELECT * FROM core_config_data WHERE path LIKE 'dev%'
Change from 1 to 0 merge_css and merge_js
In my case I have changed the permissions of folder and its recurring files and folder and it started working. Try it once.

Categories