Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
ckgedit cannot save changes / page replaced with "false"
Page:  1  2  next 
Avatar
petroser #1
Member for 3 months · 12 posts
Group memberships: Members
Show profile · Link to this post
Subject: ckgedit cannot save changes / page replaced with "false"
If I edit some old pages created with "DW Edit" I cannot save them.

After first press on save buttot happens nothing and I see in Apache Log requies for:

"POST /dokuwiki/lib/plugins/ckgedit/scripts/draft_delete.php HTTP/1.1"

After second press I leave the ckgedit without save and see in Apache log:

POST /dokuwiki/doku.php HTTP/1.1
...
GET /dokuwiki/lib/plugins/ckgedit/scripts/mediamgr.js
GET /dokuwiki/lib/tpl/bootstrap3/assets/bootstrap/js/bootstrap.min.js
...

By same pages, if I switch to "DW Edit", the page content will be repalced with word "false"

Does someone knowm, how can I make any troubleshooting or fix the problems?

Thank you!
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
It looks like a javascript issue, so what does the browser show in the javascript console?  You say these are 'old' pages.  What about new pages.  Also, the problem can be originating in your bootstrap3 template.  Have you updated it to the latest release?  And are you using the latest ckgedit?
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
petroser #3
Member for 3 months · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Turnermm,

thans a lot for the prompt response! I am more user that developer :), but I try to bring the correct answers (pagename replaced with "*" ) ...
Here are the answers:

Problem 1: (cannot save page)

> It looks like a javascript issue, so what does the browser show in the javascript console?

By load I see in the console:

Refused to load manifest from 'https://***.com/dokuwiki/lib/exe/manifest.php'
because it violates the following Content Security Policy directive: "default-src 'none'".
Note that 'manifest-src' was not explicitly set, so 'default-src' is used as a fallback.

By press save I see

js.php?t=bootstrap3&tseed=ea283e15ad72e87478c8fd0659abad6a:1
Uncaught Parse Error: <a class="wikilink1 curid" data-curid="true" href="/dokuwiki/doku.php?id=*:*"
title="*:*">go to top</a> | <a class="wikilink1" href="/dokuwiki/doku.php?id=*:start#system_configuration"
title="*:start">back to Index</a> | <a class="wikilink1"
href="/dokuwiki/doku.php?id=*:start" title="*:start">Wiki start page</a> ]</p>

and link to
js.php?t=bootstrap3&tseed=ea283e15ad72e87478c8fd0659abad6a:1

> You say these are 'old' pages.  What about new pages. 
New pags are all OK, but I suppose that it's about some tag which was used in old pages and which I do not create in new.
I'll try to find out which tag is it.

> Also, the problem can be originating in your bootstrap3 template.  Have you updated it to the latest release? 
as I see the link to bootstrap3, you are right, however I am not owner of PHP installation. Can you say, how can I check the bootstrap version? I can order the update if it's necassary.

~> php -v
PHP 7.0.7 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies


> And are you using the latest ckgedit?
yes ... at least dokuwiki propose no newer version.


Problem 2 (erase page and write "false" instead by switch to another editor)

I see just very quickly something in the console and than it's replace the page and in the console I see

Refused to load manifest from 'https://***.com/dokuwiki/lib/exe/manifest.php'
because it violates the following Content Security Policy directive: "default-src 'none'".
Note that 'manifest-src' was not explicitly set, so 'default-src' is used as a fallback.

Thank you again for your help!
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
What browser are you using?  Do these problems happen in all browsers?

Are you using the bootstrsap3 template?  If you are, change to the dokuwiki template.

What operating system are you using for you desktop and browser?  What operating system are you using for your installation of dokuwiki?
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
petroser #5
Member for 3 months · 12 posts
Group memberships: Members
Show profile · Link to this post
We tried, Chrome und IE 11 on the Windows 10 and Chrome and some other IE in Win 7 with the same effect.
To be earnest I do not know how to change from bootstrap 3 tempalte to dokuwiki template and what it will mean for users.
I see in configuration templates "bootstrap3", but see no other tempalte.

Dokuwiki server :
cat /etc/SuSE-release
SUSE Linux Enterprise Server 12 (x86_64)
VERSION = 12
PATCHLEVEL = 4
# This file is deprecated and will be removed in a future service pack or release.
# Please check /etc/os-release for details about this release.
Avatar
turnermm (Moderator) #6
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Goto Admin->Configuration Options
Then look for disableactions.  In the text box type: manifest

Auf Deutsch:
In Configuration Manager -> disableactions ->
geben  unter Andere Aktionen den folgenden ein: manifest
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
petroser #7
Member for 3 months · 12 posts
Group memberships: Members
Show profile · Link to this post
Hello Turnermm,

thank you, set the "manifest" in "disableactions" helped against first error message "Refused to load manifest".

The errors with save and change editor are however still here.
But I found a clue!
I just copied old page to new one and saw no error. Then I checked the OS file owners.
Our wiki is running under apache user and we have no permissions to files created by those user. The old foles were however initially copied from our old wiki. Thus the old files have different user/group from new files.

So, it seems to be that by files owned by other user/group  than apache user
- "CKGEdit" cannot save the changes. "DW Edit" can save the changes.
- The file get lost (replaced with word "false") by change Edtior from "CKGEdit" to "DW Edit" but remain by change Editor from "DW Edit" to "CKGEdit".

BTW: one more point: The users are little bit confused, that "Change of Editor" buttons, which actually impacts all pages are placed in the every page, near the buttons related to only one page. Is it possible to configure the plugin so, that "change the Editor" will be placed  somewhere in "User Tools Area"?
Avatar
turnermm (Moderator) #8
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
BTW: one more point: The users are little bit confused, that "Change of Editor" buttons, which actually impacts all pages are placed in the every page, near the buttons related to only one page. Is it possible to configure the plugin so, that "change the Editor" will be placed  somewhere in "User Tools Area"?
If you mean the dw edit and ckgedit buttons: You can get rid of the dw edit button as follows:
In action/edit.php,
replace line 682:
  $DW_EDIT_hide = $this->dw_edit_displayed();
with
  $DW_EDIT_hide =  ' style = "display:none"; ';
Then you can install the dwedit plugin.  But that plugin only accesses  the entire page, not sections.  However, you can edit any section by double-clicking in that section and the dokuwiki editor will open. 

https://www.dokuwiki.org/plugin:dwedit
https://www.dokuwiki.org/plugin:ckgedit#direct_access_to_d…
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
petroser #9
Member for 3 months · 12 posts
Group memberships: Members
Show profile · Link to this post
ok, understand. Thank you!

But the crucial question is: How can I let CKGEdit to edit the files not crated by Apache user/group like DWEdit do?
Avatar
turnermm (Moderator) #10
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Change the file ownership to apache.  If you have command line access,
chown apache file
or for the whole directory
chown -R apache dirname

If you don't have permission to make these changes, get your sysadmin to do this for you.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
petroser #11
Member for 3 months · 12 posts
Group memberships: Members
Show profile · Link to this post
Thank you for your help!
Yes, for sure I'll request it on Monday as I have no rights.

However It's nevertheless interesting, why DW Edit can change the file and CGK Edit cannot ...
May be it's point for improvement ...
Avatar
turnermm (Moderator) #12
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
It may be interesting, but it indicates a security flaw in your dokuwiki and/or server setup.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
petroser #13
Member for 3 months · 12 posts
Group memberships: Members
Show profile · Link to this post
OK, thank you!
Avatar
turnermm (Moderator) #14
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
If this is a local server without external access, it may not matter.  But it indicates that anyone who has access to the server, either through a shell or ftp, can make changes to these files.  See https://www.dokuwiki.org/install:permissions.  The fact that ckgedit cannot access these files and dokuwiki can is a file permission issue. Normally if the one can't, the other can't.  Why this is not true on your server is a bit of a mystery
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
petroser #15
Member for 3 months · 12 posts
Group memberships: Members
Show profile · Link to this post
Hello,

today I requested the change of owner/group but it unfortunetely did not help :( !

I still have JS error:

Uncaught Parse Error: <a class="wikilink1 curid" data-curid="true" href="/dokuwiki/doku.php?id=*:*" title="*:*">go to top</a> | <a class="wikilink1" href="/dokuwiki/doku.php?id=*:start#system_configuration" title="*:start">back to Index</a> | <a class="wikilink1" href="/dokuwiki/doku.php?id=*:start" title="*:start">Wiki start page</a> ]</p> ...

and link to bootstrap3 shows:

...
function(all,text){text=text.replace(/<!--(.*?)-->/g,"$1").replace(/<!\[CDATA\[(.*?)]]>/g,"$1");if(handler.chars)handler.chars(text);return"";});parseEndTag("",stack.last());}if(html==last)throw"Parse Error: "+html;last=html;}parseEndTag();
...
and page will not be save. However, if I copy the page to the new created page (same permittions and same owner), it works without parse error ...
Do you have any idea? Is it possible to switch on something like debug mode or just start parser offline to make some tests?
It seems to be some error by convertinf to html, or something like this ...
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next 
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-07-21, 02:34:21 (UTC +02:00)