You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
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 :
[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
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
This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://firefox-source-docs.mozilla.org/performance/scroll-linked_effects.html for further details and to join the discussion on related tools and features!
problem on editor.php
Screenshots
Browser & Server (please complete the following information):
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?
...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?
@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.
The dir for gout-cha.com site - the owner and group are both also www-datawww-data?
What do you have in the data dir? The following?...
data - perms 755 with www-datawww-data
backups - perms 755 with www-datawww-data
gout-cha.com - perms 755 with www-data
(dated dirs, eg 2021-11-19) - perms 755 with www-datawww-data
(files in here maybe) - perms 644 with www-datawww-data
What happens if in ICEcoder you go to the 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?
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.
Activity
Klemich commentedon Nov 10, 2021
Hi,
nothing has changed, I still can't edit online. Care to help ?
mattpass commentedon Nov 11, 2021
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...
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
backupsdir in ICEcoder and if it has write access rights?...this would seem to be triggered by trying to find in content when there is no content as the actual complaint was
this.content.stylenot being available, becausethis.contentisn'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.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?
Klemich commentedon Nov 19, 2021
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.
Klemich commentedon Nov 19, 2021
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 ?Klemich commentedon Nov 19, 2021
here is what I get on the page once connected :

mattpass commentedon Nov 19, 2021
@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:
Far more concerning - I've no clue what
content-ads.js,content-tss.jsandcontent-scripts.jsare - 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.
Klemich commentedon Nov 19, 2021
Yes, I've followed step 3

Apparently, the
content-ads.jsis a mozilla feature (?)moz-extension://0e756b11-eb87-4522-aa8c-fa80475c609f/content-scripts.jsmattpass commentedon Nov 19, 2021
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-datawww-data?What do you have in the
datadir? The following?...data- perms755withwww-datawww-databackups- perms755withwww-datawww-datagout-cha.com- perms755withwww-data2021-11-19) - perms755withwww-datawww-data644withwww-datawww-dataSettings>Generalmenu and in the options show, underBackups, uncheckkeep version control for X days- save, reload ICEcoder in browser and try again?Klemich commentedon Jan 17, 2022
Hi,
sorry for the delayed answer.
I'm getting back to it now.
Question 1 : yup, all
www-dataQuestion 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.