Open Klemich opened 3 years ago
Hi,
nothing has changed, I still can't edit online. Care to help ?
Hi @Klemich - there's a few errors to consider here and I think the JS errors already present are stopping you from saving any content. Everything seems to relate to permissions on your server somehow.
Going through them in order...
[04-Oct-2021 16:59:15 Asia/Chongqing] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/php/icecoder/lib/settings-screen.php on line 210
[04-Oct-2021 16:59:15 Asia/Chongqing] PHP Notice: Trying to access array offset on value of type bool in /var/www/php/icecoder/lib/settings-screen.php on line 217
Both of these seem to errors relate to having no dir listing for ICEcoder's backup dir. Is it there and ICEcoder has access rights to write to it? I can make some error handling adjustments here to avoid an error, but would be good to know if there's a backups
dir in ICEcoder and if it has write access rights?
Uncaught TypeError: this.content.style is undefined
icecoder.js:3131 : : parseInt(this.content.style.height, 10) / thisCM.lineCount())
...this would seem to be triggered by trying to find in content when there is no content as the actual complaint was this.content.style
not being available, because this.content
isn't available, I'd assume because there is no content shown. Do you remember how you triggered this? Same as above, I can put some error handling in to avoid edge cases like this, but would be good to know the cause.
Uncaught (in promise) SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
This seems like no data was loaded (end of data at line 1 column 1, ie, no JSON data at all), I would guess looking at the JS code in icecoder.js that it's because again something is blocking it on your server?
Summary I think it all 3 cases, there's some blocking of dirs/files which causes JS errors, which then means you can't save (JS errors tend to cause more breakages thereafter). I can look into better error handling, so JS errors don't cause follow on issues (such as not being able to save), but some investigation on your server, likely re permissions, would be advisable?
I'm coming back to it today, I'll try to find the cause of all this. It's been a long time, I've worked offline ever since. Thanks for the follow up.
so, icecoder.js permissions are like this :
-rw-r--r-- 1 www-data www-data 252264 Sep 21 17:34 icecoder.js
, 644. do you need it to me 655 ?
here is what I get on the page once connected :
@Klemich re icecoder.js, 644. do you need it to me 655 ?
- No, the JS isn't of concern really and 644 is fine. It's more the permissions on the PHP files generally in ICEcoder. Did you follow step 3 from the setup?
Copied from icecoder.net Home page:
Step 3: Set write permissions
The "owner" and "group" are likely root for that ICEcoder dir (and sub-dirs & files inside). That could be be a problem if the web server is running as www-data user. So update to the right owner & group so ICEcoder's able to work.
This can be done easily on Linux with:
chown -R www-data.www-data ICEcoder
Far more concerning - I've no clue what content-ads.js
, content-tss.js
and content-scripts.js
are - they're certainly not part of ICEcoder. I can't tell if your web hosting is messing with permissions, adding/changing JS or another issue, but generally seems to be something on your server setup that is causing real problems. So not something I can advise on really, clearly another component is causing real problems and not allowing ICEcoder to run properly.
Maybe some overly protective security perhaps.
Yes, I've followed step 3
Apparently, the content-ads.js
is a mozilla feature (?) moz-extension://0e756b11-eb87-4522-aa8c-fa80475c609f/content-scripts.js
OK, some more things to check and a test perhaps:
The dir for gout-cha.com site - the owner and group are both also www-data
www-data
?
What do you have in the data
dir? The following?...
data
- perms 755
with www-data
www-data
backups
- perms 755
with www-data
www-data
gout-cha.com
- perms 755
with www-data
2021-11-19
) - perms 755
with www-data
www-data
644
with www-data
www-data
Settings
> General
menu and in the options show, under Backups
, uncheck keep version control for X days
- save, reload ICEcoder in browser and try again?Hi,
sorry for the delayed answer. I'm getting back to it now.
Question 1 : yup, all www-data
Question 2 : my root is in var/www, would that be the problem ?
Question 3 : for a moment I thought it would, but eventually didn't change anything.
Describe the bug cannot save edited file. Just get a pop-up box message tell me "cannot save file". Either with shortcut or through the menu.
error.log :
dev console :
Uncaught TypeError: this.content.style is undefined
icecoder.js:3131 :: parseInt(this.content.style.height, 10) / thisCM.lineCount())
it would seem that the browser doesn't like the ":" at the start of the line.Uncaught (in promise) SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
problem on editor.php
Screenshots
Browser & Server (please complete the following information):