If this is your first visit, check our documentation. To post, register or login.
Forums / Basic Configuration / Cannot write in Define Pages Editor

Cannot write in Define Pages Editor

Started by ckosloff on 29 May 2023, 4:54 PM · Views: 3,617

Results 1 to 18 of 18
29 May 2023, 4:54 PM
#1
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Cannot write in Define Pages Editor

I am logged in as admin superuser.
When I try to edit a define page I cannot write, no matter which editor I use.
Please help.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

29 May 2023, 5:20 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot write in Define Pages Editor

ckosloff:

I am logged in as admin superuser.
When I try to edit a define page I cannot write, no matter which editor I use.
Please help.

There is no built in view only mode for define page content from within the ADMIN. To assist, would need to understand how the site is different from a standard default install to understand what is preventing changing text on this screen.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

30 May 2023, 4:21 PM
#3
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

There is no difference in installation, I installed on a Linode virtual machine with Debian 11, method is to set group to ckosloff:www-data and premssions to 775 to allow apache to write.
Explained here:
https://www.zen-cart.com/showthread.php?229492-The-ultimate-fix-for-permissions.
Thank you,
CK

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

30 May 2023, 4:34 PM
#4
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

I just double checked, editor writes on the live site, but not on the local test site.
BTW, live and local are installed with the same process.
I always try to test in local site, before going live.
I could write with CK editor, maybe it likes me because those are my initials.
Thank you,
CK

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

30 May 2023, 9:55 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot write in Define Pages Editor

ckosloff:

There is no difference in installation, I installed on a Linode virtual machine with Debian 11, method is to set group to ckosloff:www-data and premssions to 775 to allow apache to write.
Explained here:
https://www.zen-cart.com/showthread.php?229492-The-ultimate-fix-for-permissions.
Thank you,
CK

ckosloff:

I just double checked, editor writes on the live site, but not on the local test site.
BTW, live and local are installed with the same process.
I always try to test in local site, before going live.
I could write with CK editor, maybe it likes me because those are my initials.
Thank you,
CK

Perhaps could better explain how to possibly reproduce the observed issue.

Here is what I understand:
Login to admin.
Navigate to tools menu.
Select option related to define pages.
Select define page from drop down menu.
Window loads with text in a text box or an empty text box.

Here is what I understand from the problem description: if I try to type anything in the text box, nothing happens. I can't delete any of the text and I can't add to it.
Of course then if I select the save button, there is no change because I haven't been able to change any of the text.

That is what I understand from how the issue was described. As such, the folder or file permissions would have nothing to do with the situation. Also, the situation I just described is not a designed feature of Zen Cart.

Unfortunately, even with the additional statement of the issue occurring only on one of two sites doesn't really clarify the situation. Hopefully more will follow.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

31 May 2023, 3:48 PM
#6
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

@ mc

Here is what I understand from the problem description: if I try to type anything in the text box, nothing happens. I can't delete any of the text and I can't add to it.
Of course then if I select the save button, there is no change because I haven't been able to change any of the text.

That is an accurate description of what is happening, cannot select text or modify anything, I was trying to edit the about_us page in local site.
Of course I was logged as admin (superuser), to access the editor.
Cannot understand the issue either, will post if I find something.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

31 May 2023, 6:09 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot write in Define Pages Editor

ckosloff:

@ mc

That is an accurate description of what is happening, cannot select text or modify anything, I was trying to edit the about_us page in local site.
Of course I was logged as admin (superuser), to access the editor.
Cannot understand the issue either, will post if I find something.

That issue is not a configurable option of Zen Cart and has nothing to do with file permissions. There is something else about the software configuration/install (think of possibly jQuery or Javascript) that is preventing editing of the text box content.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

1 Jun 2023, 1:46 AM
#8
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

I'll try to be as explicit as possible:
These are the perms in responsive_classic:
root@crosshair:/var/www/html/zentest.com/includes/languages/english/responsive_classic# ls -al
total 20

drwxrwsr-x 2 ckosloff www-data 4096 May 31 21:33 .
drwxr-sr-x 8 ckosloff www-data 4096 May 26 23:42 ..
-rwxrwxr-x 1 ckosloff www-data 238 Mar 18 03:06 lang.contact_us.php
-rwxrwxr-x 1 ckosloff ckosloff 697 May 18 23:20 lang.header.php
-rwxrwxr-x 1 ckosloff www-data 1087 May 26 23:23 lang.index.php
root@crosshair:/var/www/html/zentest.com/includes/languages/english/responsive_classic
ANd this is the error I get:
Error: I can not write to this file. Please set the right user permissions on: /var/www/html/zentest.com/includes/languages/english/html_includes/responsive_classic/define_contact_us.php
Stop right there, now I see the error: I copied over lang.contact_us.php instead of the define page, bummers!

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

1 Jun 2023, 2:10 AM
#9
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

SOLVED!!
I had to copy into the right folder.
Here is the correct path and perms:

root@crosshair:/var/www/html/zentest.com/includes/languages/english/html_includes/responsive_classic# ls -a
l
total 68
drwxrwsr-x 2 ckosloff www-data 4096 May 31 22:01 .
drwxr-sr-x 4 ckosloff www-data 4096 May 27 20:57 ..
-rwxrwxr-x 1 ckosloff www-data 244 Mar 18 03:06 define_about_us.php
-rwxrwxr-x 1 ckosloff www-data 246 Mar 18 03:06 define_checkout_success.php
-rwxrwxr-x 1 ckosloff www-data 146 Mar 18 03:06 define_conditions.php
-rwxrwxr-x 1 ckosloff www-data 82 May 31 22:08 define_contact_us.php
-rwxrwxr-x 1 ckosloff www-data 144 Mar 18 03:06 define_discount_coupon.php
-rwxrwxr-x 1 ckosloff www-data 995 May 27 20:32 define_main_page.php
-rwxrwxr-x 1 ckosloff www-data 135 Mar 18 03:06 define_page_2.php
-rwxrwxr-x 1 ckosloff www-data 134 Mar 18 03:06 define_page_3.php
-rwxrwxr-x 1 ckosloff www-data 134 Mar 18 03:06 define_page_4.php
-rwxrwxr-x 1 ckosloff www-data 149 Mar 18 03:06 define_page_not_found.php
-rwxrwxr-x 1 ckosloff www-data 126 Mar 18 03:06 define_privacy.php
-rwxrwxr-x 1 ckosloff www-data 132 Mar 18 03:06 define_shippinginfo.php
-rwxrwxr-x 1 ckosloff www-data 294 Mar 18 03:06 define_shopping_cart.php
-rwxrwxr-x 1 ckosloff www-data 266 Mar 18 03:06 define_site_map.php
-rwxrwxr-x 1 ckosloff www-data 238 Mar 18 03:06 lang.contact_us.php

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

1 Jun 2023, 2:31 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot write in Define Pages Editor

As has been said in relation to other posts you've made about file and folder permissions, those may be necessary for your system (775) but are not standard nor otherwise directly suggested in the Zen Cart installation docs.

Yes, that information may help you in the future, which is great, but it may open a security issue for someone else and why forum members post information such as this one.

I again note though, the described error about not being able to save the file, at what point in trying to access the define page was that log generated?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

1 Jun 2023, 8:46 PM
#11
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

mc12345678:

As has been said in relation to other posts you've made about file and folder permissions, those may be necessary for your system (775) but are not standard nor otherwise directly suggested in the Zen Cart installation docs.

Yes, that information may help you in the future, which is great, but it may open a security issue for someone else and why forum members post information such as this one.

I again note though, the described error about not being able to save the file, at what point in trying to access the define page was that log generated?

Respectfully, I have already clarified that my instructions are meant for only a certain kind of systems, I really ignore how other systems work.
There is a thought-process behind the way I explained, mainly the way apache2 defines envvars:

# envvars - default environment variables for apache2ctl

# this won't be correct after changing uid
unset HOME

# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
    SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
    SUFFIX=
fi

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
[B]export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data[/B]

Please, let's not continue beating a dead horse.
This is a friendly remark, please don't take to offense.

CK

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

1 Jun 2023, 8:57 PM
#12
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

@ mc,

I again note though, the described error about not being able to save the file, at what point in trying to access the define page was that log generated?
I don't quite remember which ones of my multiple tries generated the error, basically it was generated by copying the wrong file into an incorrect directory, when I realized what the correct folder was I moved the file in there and set directory to correct perms (again, for my system), that cleared all errors.
The file was not installed previously there, that is why the editor could not write, I had to copy over the base file. It never said it could not save, but could not write.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

1 Jun 2023, 10:37 PM
#13
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot write in Define Pages Editor

ckosloff:

Respectfully, I have already clarified that my instructions are meant for only a certain kind of systems, I really ignore how other systems work.
There is a thought-process behind the way I explained, mainly the way apache2 defines envvars:

envvars - default environment variables for apache2ctl

this won't be correct after changing uid

unset HOME

for supporting multiple apache2 instances

if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi

Since there is no sane way to get the parsed apache2 config in scripts, some

settings are defined via environment variables and then used in apache2ctl,

/etc/init.d/apache2, /etc/logrotate.d/apache2, etc.

[B]export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data[/B]

> 
> Please, let's not continue beating a dead horse.
> This is a  friendly remark, please don't take to offense.
> 
> CK

No offense. As an avid reader and seeker for success, because each thread is its own issue, others won't know about how or why your system isn't like the vast majority. 

As @swguy has pointed out, others may arrive here having experienced a similar issue but the issue may have occurred for a different reason. 

Identifying the contributing conditions helps them determine the value of the fix and/or cause of their issue. My posting of the associated information was in furtherance of completing the posting tips as relates to the issue in this thread. 

Those that have offered assistance do so voluntarily. Ideally they will continue to do so especially when enough information is made available as directly relates to the posted issue. 

It's a lot to consider and from my perspective you've been adventurous in working with the software. I certainly don't want you to be discouraged to seek support. Your extra effort to bound the conditions will get you the needed help a whole lot faster and more effectively to send you off to increase your profit.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

1 Jun 2023, 10:47 PM
#14
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

The only error I found in Zen Cart install is that some define pages like contact_us are missing in the template, and you have to copy the base file into the right template folder to make it work, that is an extra step that the user must take maybe fixed in later versions when Zen Cart will have AI. :)

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

1 Jun 2023, 11:52 PM
#15
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,904
Plugin Contributions:
23

Re: Cannot write in Define Pages Editor

That's because all the define_*** pages come in the includes/languages/english/html_includes folder to be saved in YOUR_TEMPLATE after editing.

And, again, you may want to rip the shrink wrap off the docs. https://docs.zen-cart.com/user/template/define_pages/

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

2 Jun 2023, 5:47 PM
#16
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

Totally agreed, before rushing into forum or the test site, I should go over docs.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

2 Jun 2023, 8:28 PM
#17
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot write in Define Pages Editor

ckosloff:

Totally agreed, before rushing into forum or the test site, I should go over docs.

Sometimes also using your favorite internet search engine to include the phrase Zen Cart may also get to a close related thread. If the issue isn't specifically with current code, it likely has been addressed.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

2 Jun 2023, 9:42 PM
#18
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Cannot write in Define Pages Editor

Let's close this thread.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)