Forums / Customization from the Admin / edititing define pages problems from admin

edititing define pages problems from admin

Locked

Views: 3,703

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
8 Jun 2006, 7:16 AM
#1
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

edititing define pages problems from admin

I have just set up zen cart again using the default template (renamed) and the define pages editor gives me this error when i go to save changes

Warning: fopen(E:/Inetpub/wwwroot/my_site/cart/includes/languages/english/html_includes/define_main_page.php) [function.fopen]: failed to open stream: Permission denied in E:\Inetpub\wwwroot\my_site\cart\admin\define_pages_editor.php on line 92

Warning: fwrite(): supplied argument is not a valid stream resource in E:\Inetpub\wwwroot\my_site\cart\admin\define_pages_editor.php on line 94

Warning: fclose(): supplied argument is not a valid stream resource in E:\Inetpub\wwwroot\my_site\cart\admin\define_pages_editor.php on line 95

Warning: Cannot modify header information - headers already sent by (output started at E:\Inetpub\wwwroot\my_site\cart\admin\define_pages_editor.php:92) in E:\Inetpub\wwwroot\my_site\cart\admin\includes\functions\general.php on line 34

can anybody please offer advise, thanks, Rod

Rod

8 Jun 2006, 7:18 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: edititing define pages problems from admin

Did you rename the template_default directory or make a copy of it including all the files it conatins? (Neither would be a good idea). And have you told the Admin system to use your copied/renamed template?

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

8 Jun 2006, 8:31 PM
#3
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Re: edititing define pages problems from admin

Thanks for Responding Kuroi, yes i did copy the template_default, and going back over the faqs i see that i have to copy the template_default folder and put it inside new one, thanks, and back to the start i go, Rod

Rod

8 Jun 2006, 9:16 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: edititing define pages problems from admin

rocketrod:

Thanks for Responding Kuroi, yes i did copy the template_default, and going back over the faqs i see that i have to copy the template_default folder and put it inside new one, thanks, and back to the start i go, RodNo. You don't copy the template_default folder.

Instead create a new folder in the includes/templates directory called for example "custom". Then copy template_info.php into it from template_default and edit the new file to give your template a name (e.g. "Custom").

Then go to Admin and from the "tools" menu select "template selection" choose your new template.

And that's it. You are now using template_default in full default mode. From here copy only file that you want to chnage into your custom template respecting the file structure for template_default. For example you will certainly want to create an includes/templates/custom/css directory and put a copy of the stylesheet.css in there ready for editing, but most of the other files in template_default will never need to be touched. Some of the other instructions in this forum, the FAQ and the Wiki suggest that you should copy more files than this, but that's an historical throwback to a time when the authors were assuming that you would need to change more code than is now necessary.

If you would like to see an example of a lightweight template in action, take a look at the future Zen template (there's a link in my sig below to its location in the download section. It shows how much can be achieved with just a stylesheet and a handful of images.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

8 Jun 2006, 9:39 PM
#5
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Re: edititing define pages problems from admin

Thanks Kuroi, i have taken that on board, and installed the futurezen,( looks great)
but still cant use the define pages editor, it come up with the same error messages, Rod

Rod

8 Jun 2006, 10:34 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: edititing define pages problems from admin

I'd take a close look at this file> E:/Inetpub/wwwroot/my_site/cart/includes/languages/english/html_includes/define_main_page.phpIt must be there otherwise the define pages editor simply wouldn't have offered it as an option. But if it can't be opened, I wonder if it is corrupt or has somehow acquired read-only status so can't be opened for writing. If necessary delete it completely and replace it with a completely empty file (created via Notepad not Word) with the same name and try again.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

9 Jun 2006, 12:26 AM
#7
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Re: edititing define pages problems from admin

Thanks Kuroi, yes i can edit it with notepad, maybe something corrupt :-( somewhere, will check out other define pages, thanks, Rod

Rod

13 Jun 2006, 3:47 PM
#8
jjfender avatar

jjfender

New Zenner

Join Date:
May 2006
Posts:
14
Plugin Contributions:
0

Re: edititing define pages problems from admin

Has anyone experienced the define pages editor not saving changes to the ZenCart? Any suggestions on how to fix this problem would be appreciated. Thanks.

Jonathan

14 Jun 2006, 1:47 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: edititing define pages problems from admin

Make sure that the /includes/languages/english/html_includes directory, subdirectory and all files are set to 777 or you cannot edit them in the Admin ...

NOTE: if you upload changes ... the file will no longer be 777

NOTE: if you make changes in the Admin ... the only copy is on your server, be sure to always backup this directory ...

NOTE: you should always use the templates and overrides for the define pages or you will be doomed on an upgrade ... :eek:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 Jun 2006, 8:13 AM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: edititing define pages problems from admin

Ajeh:

Make sure that the /includes/languages/english/html_includes directory, subdirectory and all files are set to 777 or you cannot edit them in the Admin ...

NOTE: if you upload changes ... the file will no longer be 777

NOTE: if you make changes in the Admin ... the only copy is on your server, be sure to always backup this directory ...

NOTE: you should always use the templates and overrides for the define pages or you will be doomed on an upgrade ... :eek:Hi Linda

This is all good advice, especially the bit about using overrides for the define pages. I've been a bit puzzled for a while as to why Zen Cart has this rather dangerous exception to the overrides system in the Define Pages Editor. Are there plans to change it? Or is deliberate to keep things simple for new users switching between templates?

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

15 Jun 2006, 4:18 AM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: edititing define pages problems from admin

Well ... originally this was because there was one page with a define page ...

Then, more people needed it for other pages so the same technique was used for a few more pages ...

And it grew in popularity ... so more pages were added ... again using the same concept ...

Unfortunately ... people become very confused by this and tend to write the files both on and off line ...

The problem being the settings of the files changing from 777 to 644 when overwritten and having to be 777 to touch in the Admin editor for those who use that method ...

At some point, this really needs to be done in the database to prevent the lack of backups and damage to the files and permission issues ... but that will take quite some time and need a new method to upload from the server these files and still allow offline writting without making messies to the database ... :blink:

Consequently, this is done as an override and people are warned as often as possible to be aware that the only true version exists on the server and this does need to be backed up from server to offline vs from offline to server like the other files ...

While very convenient and starting to save a lot of errors in a regular language file with defines ... this introduces its own set of issues at this time ... :cry:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Jun 2006, 4:48 AM
#12
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: edititing define pages problems from admin

Ajeh:

:cry:
I see what you mean. I've seen a few like this myself. To your list I'd add the problem of all that nasty inline styling that the Define Pages Editor positively encourages users to add. I don't envy you trying to unravel this one. Many thanks for the background.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

15 Jun 2006, 4:51 AM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: edititing define pages problems from admin

Wouldn't be nearly as bad except ... I added all of those nifty little switches and defines for all the pages and was the bright bulb who thought what a great way to have folks with no knowlege of editing php files update their text, etc. to read just the way the want it ... :lookaroun

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!