Editing theme.tpl caused Gallery to dissappear.....
johnlon
Joined: 2006-01-10
Posts: 105 |
Posted: Sat, 2009-07-25 17:49 |
I wanted to add a logo and a few urls to the new gallery, and copied and posted from an old theme.tpl saved it, and the site dissappeared. I have no idea at all how that happened. I have looked at the origional copy, to see if I changed anythign, nothing I can see. I removed the edited copy, pasted the origional back, still nothing. I am at a total loss as to why it wont show. My url is http://www.hamstercareforum.co.uk/Gallery2/ Would anybody have any ideas? Thank you. John.. |
|
Posts: 16504
Try clearing your cache:
FAQ: How can I clear cached data?
http://codex.gallery2.org/Gallery2:Editing_Templates
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 105
Hi, I tried doing that, and it caused an error. I cannot access the site again.
Error Detail -
Error (ERROR_BAD_PARAMETER) : Smarty error: The template 'themes/classic/templates/theme.tpl' does not exist.
* in modules/core/classes/GallerySmarty.class at line 76 (GalleryCoreApi::error)
* in modules/core/classes/GalleryTemplate.class at line 442 (GallerySmarty::trigger_error)
* in ??? at line 0 (GalleryTemplate::resourceGetTemplate)
* in lib/smarty/Smarty.class.php at line 1559
* in lib/smarty/Smarty.class.php at line 1414 (Smarty::_fetch_resource_info)
* in lib/smarty/Smarty.class.php at line 1260 (Smarty::_compile_resource)
* in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 219 (GallerySmarty::fetch)
* in main.php at line 521 (GalleryTemplate::fetch)
* in main.php at line 104
* in main.php at line 88
Looks like the second url you gave me is going to be the one that i need to look at.
John
Posts: 105
That's strange, I have changed Line 150 from false to true, and it still says error.
Error (ERROR_BAD_PARAMETER) : Smarty error: The template 'themes/classic/templates/theme.tpl' does not exist.
* in modules/core/classes/GallerySmarty.class at line 76 (GalleryCoreApi::error)
* in modules/core/classes/GalleryTemplate.class at line 442 (GallerySmarty::trigger_error)
* in ??? at line 0 (GalleryTemplate::resourceGetTemplate)
* in lib/smarty/Smarty.class.php at line 1559
* in lib/smarty/Smarty.class.php at line 1414 (Smarty::_fetch_resource_info)
* in lib/smarty/Smarty.class.php at line 1260 (Smarty::_compile_resource)
* in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 219 (GallerySmarty::fetch)
* in main.php at line 521 (GalleryTemplate::fetch)
* in main.php at line 104
* in main.php at line 88
The line shows its right in the file.
Trying to click on the ctrl F5 says security violation, do not have permiossion to do this.
Also, not sure why it should say theme.tpl does not exist, as I am looking at it.
John
Posts: 105
Ok, this is odd, I am in the Gallery>/lib/Support> deleted cache from there leaving the thumbnails, shown in the first url, still didnt work, still showing same error.
John.
Posts: 16504
Are the login credentials still the same? Is it o.k. by you if I log back in and take a look?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 105
Hi, yes they are the same.
Thank you.
John.
Posts: 105
Ok, found out what was causing the problem with the theme.tpl, it was the files permissions. I just used the command line to change the file permissions, and the site is back up. Yippee.
The problem is, its still not showing the changes I made. Its quite frustrating. Were these changes that were made in this update regarding editing files, for security reasons, it certainly is making it secure if that is the case.
What do I do now to get the changes I made to show up. I have tried everythign that was suggested, should I go through them again?
Thank you.
John.
edit....been through everything that was posted about yesterday, but the changes to the theme.tpl file to show logo and a few urls at the top of the page, just wont show even though they are seen in the file. Most frustrating.
Posts: 16504
Ah, I see. Now that I can pull up the theme.tpl file, your changes are just in the wrong spot. The code is going:
If FullScreen do this
Else If Progress bar do this (this is where your code is)
Else (if anything else) display a normal header for a normal page) << This is where you want your code to go (see below)
End If
I also disabled template caching on your site, see this for why: http://codex.gallery2.org/Gallery2:Editing_Templates (see Theme Override)
You can re-enable that after you've made your changes.
If you're trying to lock your install down:
http://codex.gallery2.org/Gallery2:Security
And if you want making changes to be a real pain:
http://gallery.menalto.com/node/82990#comment-290770
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 105
Oh dear, I thought I had it just right, thank you so much for looking. I also thought I had disabled the caching. I am not sure why that didnt work. The lines that you have crossed out, are they to reman or be deleted. I dont mind keeping the Gallery2 Logo at the right side.
Thank you again,
John.
Posts: 16504
I just crossed them out because most people who customize the theme and want their own logo in there don't want Gallery's logo. You can leave them or delete them, doesn't make any difference.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 105
Tried that changed it to where you said, and I get a security violation when I try to access the gallery, so I am not sure what happened. grrr. This is so frustrating. I know I must be doing something wrong, but I dont know what?
John
Posts: 105
Ok, after going through everything again, for some reason, when I edited the file it reset the file permissions again, so I have set them back and its working. I have the logo and the links there but they arent in the right place. Have to change the html.
Posts: 105
In gallery how do you make a space between something, as it stand now, the three links are all together in one sentence, no breaks. I need a break between each link.
Posts: 16504
That's not Gallery, that's HTML. Put line breaks in there:
Posts: 105
Hi sorry I took so long to get back to you. It worked, not completely as I wanted it, but its ok.
Thank you so much for all your help.
John.