![]() |
|
Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: Fatal Error: "Cannot edit this file!" on editing duplicated theme-files (/thread-11389.html) |
Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - VH - 02-10-2013 Hello! I've duplicated the default-theme by the "Duplicate"-button, give the name and directory when asked for in the dialog boxes. Can see that stuff in the directory "themes", a full copy of the default-theme with my given label. So far, so good, directories- and files-rights are setted to 755. When using the Button "Edit" to work on my own theme the "Theme-File Editor" is opened. Choosing a file to Edit brings up: Fatal error: Cannot edit this file! in {my server-folder}/zp-core/functions-common.php on line 283 Figured out, that in the database-options-table (options) the option "Zenphoto_theme_list" (called in admin_functions.php, line 2756) doesn't list my dupliciated theme. ZP-Version: 1.4.5.2 [7e1a181548] Thanks, Regards, VH Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - acrylian - 02-10-2013 That is probably a file/folder permissions issue. Either it cannot copy or it sets wrong ones. Try to set the permissions via FTP (see user guide about info) or duplicated the theme manually via FTP as that might set the right permissions. Both does the same anyway. Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - VH - 02-10-2013 I've tried what you've mentioned and created the directory via FTP and copy the files also that way - still get this error (right are setted to "0755"). I don't think it's a permission error. Have a look at this code in admin_themes_editor.php (starting in line 79): [quote] // If we're attempting to edit a file that's not a text file or that does not belong to the theme directory, this is an illegal attempt [/quote] For me it look's like the duplicated theme is not in the list of availiable themes (table options, record "Zenphoto_theme_list"; '!in_array( $file_to_edit, $themefiles )' turns TRUE...? I'm not an expert...)... Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - acrylian - 02-10-2013 Please post all you find also in Zenphoto's own debug log. Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - sbillard - 02-10-2013 The option you refer to lists only the standard themes, so it is no surprise that yours is not there. If the Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - VH - 03-10-2013 Hello again! Chief-Developer... Whow... think, you're one of the best persons to tell, how much I zenPHOTO like. Very good stuff, simple to use and customiziable, just also for dummies like me. Congratulations, the team of zenPHOTO got evidently an effectual understandig on the practical meaning of Zen... :-) Back to the "Problem", latest news: I've installed zenPHOTO on my local machine (Win7 SP2, xampp 3.1.0). It works in this constellation, I can open file for editing! By installing I was asked for some permissional things, I set the "rights-mangement" to "strictly" (0644) - on the host-installation (Sun OS 10.x(?)) I wasn't asked for that. May be it's really a permissions-"problem". How can I check (and maybe update) the settings on my host-installation (How can I recall the Installation-routine without re-installing zenPHOTO)? And just another question, on the fly: when I have installed zenPHOTO and change afterwards the URL -without changing the directory zenPHOTO is installed in- I can't login. What is to change additional to give zenPHOTO a "knowledge" about the changed URL? Thanks a lot for your friendly, longanimous assistance, I will donate to aid the project and please excuse my horrible english... Regards, VH Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - acrylian - 03-10-2013 Thanks we like to hear that! It can be a permissions issue. 644 ist stricter and not all servers work with that. Try one lever less strict (but never 777). My server does not allow the strictest, too but that does not matter since it is additionally secured by the host anyway. You can re-run setup by Since I am maintaining the German translation, sure with those thousands of string there are surely some spelling errors I missed. Please see here about contribution info: http://www.zenphoto.org/news/translating-tutorial You need to use the latest master from Github for the translation and need a free GitHub account in any case. PS: No worries about your English :-) Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - VH - 03-10-2013 Thank you, so far... Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - sbillard - 03-10-2013 I think acrylian has well described the permissions issues. But I will add some things. To be clear, what works is a server dependent thing. Ideally you would want the permissions to be strict as you have done. But various "security" patches to servers may make this not work. In addition, sometimes servers do other things differently that prevent Zenphoto from accessing files which it creates. All a pretty big mess, unfortunately, but nothing we can do about it. You can look via FTP at the permissions of the files, but as per above that my not tell you anything. I do not know how you can see who the "owner" of the files is, which is another thing that can go wrong. But all these issues should be reflected in a log somewhere except if the server is "hiding" these files somehow from Zenphoto. Fatal Error: "Cannot edit this file!" on editing duplicated theme-files - VH - 04-10-2013 Thank you for your hints! I'm "playing" around with my host server and it's really a bit tricky with that permissioninal and owner things... |