Editing theme.tpl caused Gallery to dissappear.....

johnlon
johnlon's picture

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..

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2009-07-25 20:42

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

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sat, 2009-07-25 21:13

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

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sat, 2009-07-25 21:23

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

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sat, 2009-07-25 21:34

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.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2009-07-25 21:39

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

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sat, 2009-07-25 21:42

Hi, yes they are the same.

Thank you.

John.

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sun, 2009-07-26 09:08

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.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-07-26 15:47

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

      {if $theme.useFullScreen}
	{include file="gallery:`$theme.moduleTemplate`" l10Domain=$theme.moduleL10Domain}
      {elseif $theme.pageType == 'progressbar'}
	<div id="gsHeader">
	  <img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48" alt=""/>
	</div>
<h2><font color=#006699 ><center><img src="http://www.example.co.uk/logo01.jpg"></center></h2>
<h2>
<a href="http://www.example.co.uk">Furry Critters Homepage</a>
<a href="http://www.example.co.uk/phpbb/">Furry Critters Forum</a>
<a href="http://www.example.co.uk/">Furry Critters Blog</a></h2>
	{g->theme include="progressbar.tpl"}
      {else}
      <div id="gsHeader">
	<a href="{g->url}"><img src="{g->url href="images/galleryLogo_sm.gif"}"
	 width="107" height="48" alt=""/></a>
      </div>

PUT YOUR CODE HERE

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sun, 2009-07-26 16:04

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.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-07-26 16:58

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

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sun, 2009-07-26 17:42

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

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sun, 2009-07-26 18:43

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.

 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Sun, 2009-07-26 18:51

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.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-07-27 03:34

That's not Gallery, that's HTML. Put line breaks in there:

<br>
 
johnlon
johnlon's picture

Joined: 2006-01-10
Posts: 105
Posted: Mon, 2009-07-27 19:22

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.