Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2 3   Go Down

Author Topic: sudden problem with gallery loading  (Read 23349 times)

0 Members and 1 Guest are viewing this topic.

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
sudden problem with gallery loading
« on: January 29, 2006, 03:10:41 am »

I was working on my gallery then when I hit refresh it gives me the following mesage comes up and nothing else:
Template error
Failed to find block 'output_buffer'(#(<!-- BEGIN output_buffer -->)(.*?)(<!-- END output_buffer -->)#s) in :

        <tr>
                <td class="tableb" align="center">
                        <font size="3"><b>{MESSAGE}</b></font>
<!-- BEGIN file_line -->
                        <br />
                        <br />
                        {FILE_TXT}{FILE} - {LINE_TXT}{LINE}
<!-- END file_line -->

                        <br /><br />
                </td>
        </tr>

I cannot get to my gallery at all now only this, I do not know what caused this. Could anyone please help me? Thank you very much for any help.
« Last Edit: January 29, 2006, 02:32:12 pm by kb1100 »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #1 on: January 29, 2006, 07:06:38 am »

This looks like a theme error.  Did you customize $template_cpg_die in your theme.php?  If you did, you need to copy $template_cpg_die from sample/theme.php and include the output_buffer block.  If you want that block to be empty, empty out the space between the <!-- BEGIN output_buffer --> and <!-- END output_buffer -->, but do *not* delete those two comments.  That should solve your problem.

If you had searched for "template error" or "failed to find block", you would have found a sticky thread on the themes board that describes this error in detail.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #2 on: January 29, 2006, 02:31:20 pm »

Ok, thank you if I have a problem again I will search first. But I was using the default theme, I hadnt changed anything. Snork made me a new theme that I had added but I was not using it, and I don't code so I didn't know what had happened. Do you think this is something I would be able to fix?
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #3 on: January 29, 2006, 06:34:01 pm »

kb1100: Ok.  My response covered the most likely case for the information you gave.  If it doesn't cover your case, let's continue the support discussion.  You are using the classic theme, unmodified?  If so, the classic/theme.php is empty, so that would be very weird to have this problem.  Have you modified any of the core scripts?  Please provide a link to your site.  Even if you are stuck right now with that error message, we might be able to look at what it's saying and figure out more details of the problem.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #4 on: January 29, 2006, 09:25:08 pm »

Yes, I was using the default theme and I had not modifyed it at all. And I had just been to the page 20 minutes before with it working fine. I would like to keep the url private so I do not want to post it here, if you can help I can email you the link or something if necessary. But I don't know what the link to the site would do seeing every page gives the same error that I posted, its just an all white screen with the text that I posted.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #5 on: January 29, 2006, 10:14:38 pm »

Ok.  Assuming you're using 1.4.3 (or 1.4.2), the error message you're getting could only come from one place.  This line is in the file functions.inc.php (which is in the "include" directory):
Code: [Select]
template_extract_block($template_cpg_die, 'output_buffer');
If you comment out this line as shown:
Code: [Select]
// template_extract_block($template_cpg_die, 'output_buffer');you should be able to access your site again.

However, the reason why this line is executed is because your Coppermine site has another error that causes the cpg_die function to be called.  But at least you should be able to figure out what the error is.

Ideally, you should uncomment that line afterwards because the output buffer is generally not necessary with the current debug info returned. 

The base reason you are getting the "failed to find block" error can only be one of two cases:
(1) you modified themes.inc.php and removed the output_buffer block from $template_cpg_die
(2) you modified your current theme.php and did the same thing
I cannot think of any other way you can get this particular error.  If you didn't modify either file, I guess one of those files must be corrupt.  Or you are using a hack/mod/add-on/plugin that removes this block somewhere else.

edit: For example, I can reproduce this same error by adding $template_cpg_die to my theme.php, removing the output_buffer block, then trying to access admin.php from a non-admin account.
« Last Edit: January 29, 2006, 10:20:44 pm by Paver »
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #6 on: January 29, 2006, 11:22:27 pm »

Thank you very much for your help. I did exactly as you told me by adding // in front of that line of code. When I try to go to my gallery now I get the following instead:
Template error
Failed to find block 'log_ecards'(#(<!-- BEGIN log_ecards -->)(.*?)(<!-- END log_ecards -->)#s) in :

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
<!-- BEGIN admin_approval -->
                                <td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
<!-- END admin_approval -->
                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>

                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>

I understand logically that you can only come up with those reasons but I honestly did none of the things you came up with. The last thing I did was edit a description of an image, and when I came back I got that error.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: sudden problem with gallery loading
« Reply #7 on: January 29, 2006, 11:30:57 pm »

Could you post the description you entered?
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #8 on: January 29, 2006, 11:41:18 pm »

The description was deleting what I had before, but I didn't think that would cause this seeing I didn't change any code or anything. That was just in the actual image options.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #9 on: January 29, 2006, 11:45:12 pm »

Let's confirm a few more basics about what you have.
  • You are running a new install of 1.4.3 with no plugins, no mods, no hacks applied.
  • You are set up with the "classic" theme, which you have not modified.
  • The new theme from "Snork" is in its own folder in the themes/ directory with no other files anywhere else.
Please confirm these 3 things, and add details you can think of.

The reason this is important is that the 2 errors you received are theme errors, but the "classic" theme has no theme customizations whatsoever, so this is truly a mystery. 

A link to your site would help us since we can try to run other files in Coppermine to give us an idea what causes this error.  If you want to keep it private, that's OK, but it will take more careful details to figure out what's going on.  We like to keep support on the public forums, and we don't want to start receiving links in PMs because I would think that would start a flood of such requests.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #10 on: January 30, 2006, 12:05:33 am »

Yes, I am running 1.4.3, and I haven't installed anything other then Snorks theme. Which was simply putting the folder in the themes folder. Yes, I am using the classic theme and I have not modified it at all. I haven't used Snorks theme nor added any other files any where other then adding images to the albums folder. I don't know what else really to add I am just as mystified as you. I was working on the gallery deleted a description and the next time I came to it I recieved that error. You can instruct me if you need a link or ftp info.
« Last Edit: January 30, 2006, 12:54:23 am by kb1100 »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #11 on: January 30, 2006, 12:54:30 am »

First of all, I don't know who Snork is and what theme is his.  But I assume it's not named 'classic' and so didn't overwrite that one. 

Look in your database, using phpMyAdmin or whatever else you have, in the cpg143_config table for the record with name="theme", i.e.:
Code: [Select]
SELECT * FROM `cpg143_config` WHERE name='theme'(replacing cpg143_ with whatever prefix you used for the database tables).

If it has a value of "classic", then look in your themes/classic/theme.php and make sure it's blank (except for the header comments).
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #12 on: January 30, 2006, 01:13:02 am »

I went to my phpmyadmin Am I looking for theme on the left in that list on the main page? If so its not there. Or are you saying go to the config on that list and look for the theme in there?
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #13 on: January 30, 2006, 01:18:47 am »

I'm not sure which page of phpMyAdmin you are talking about.  The database is whatever name you picked, the table name is "cpg143_config", then in that table, there are 2 fields: "name" and "value".  The record you are looking for has a "name" field of "theme". The "value" of that record is what you want.

Alternatively, in phpMyAdmin, you can click on the SQL tab and put in the SQL command I posted and that should give you the result.  Oh, as long as you are in the correct database.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #14 on: January 30, 2006, 01:49:55 am »

Ok, when I put that line in I get this:
Showing rows 0 - 0 (1 total, Query took 0.0004 sec) 
SQL-query:
SELECT *
FROM `cpg140_config`
WHERE name = 'theme'
LIMIT 0 , 30 
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: sudden problem with gallery loading
« Reply #15 on: January 30, 2006, 01:53:39 am »

Look further down the page... there should be a table that lists the name of the theme. I got the same message when I ran the query.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #16 on: January 30, 2006, 02:02:45 am »

This is the oly other thing on the page beside a print option:
id  select_type  table  type  possible_keys  key  key_len  ref  rows  Extra 
1 SIMPLE cpg140_config ref PRIMARY PRIMARY 42 const 1 Using where
 
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #17 on: January 30, 2006, 10:07:48 am »

If you type the MySQL statement in the pop-up window, the result will be on the main window (even if the pop-up window doesn't close itself).  In either case, on the main window you should see a table with a repeat of the statement you entered which has a table header of either "Showing rows 0 - 0 (1 total, Query took 0.0006 sec)" or "MySQL returned an empty result set (i.e. zero rows). (Query took 0.0004 sec)".  The empty result message will obviously not show anything else.  If you get the first message, there will be another table below the echoed MySQL statement with the results of the query.  With only one result, it will be a small table.  You'll see column headers of "name" and "value" and the first & only row with "theme" and whatever your theme is set to.

It's interesting that your table prefix is cpg140.  Did you originally install a 1.4 beta, before 1.4.2 or 1.4.3 were released as stable releases?  Or did you just pick "cpg140" as a generic 1.4 table prefix?  The default for 1.4.3 is "cpg143".
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #18 on: January 30, 2006, 09:43:23 pm »

I posted all that came up when I put that line into the query window which was:
Showing rows 0 - 0 (1 total, Query took 0.0004 sec) 
SQL-query:
SELECT *
FROM `cpg140_config`
WHERE name = 'theme'
LIMIT 0 , 30 

Here is a link to a screen cap so you can see what I am seeing: http://img489.imageshack.us/my.php?image=phpmyadmin5ux.png
Im not sure on the other question, I thought I had the latest vesion I downloaded it a couple of months ago
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #19 on: January 30, 2006, 09:56:34 pm »

The first stable release of the 1.4 series was 1.4.2 and was released on November 24th.  The latest release is 1.4.3 and was released on December 27th.  I think you downloaded the beta version and that might be related to this issue since your theme is set to be "core", not "classic".  I'll have to go find a beta release to figure out what the "core" theme is; I haven't heard of it, but I'm a new dev team member so it might have been "before my time".

Looking at your screencap (thanks for posting it), you'll see a small table, just above the text "check all", "uncheck all".  This table shows "name = theme", "value = core".  As I said above, your theme is set to "core", what I don't recognize.  The current default simple theme is "classic".  The "classic" theme is dirt-simple as I said, and doesn't include any customizations so the errors mentioned above are not possible with the "classic" theme.

You could try a quick fix of changing that config value in phpMyAdmin to "classic", but I don't think this is a good fix.  I think you are going to have lots of other issues due to having an outdated version.

The best thing to do would be to download 1.4.3 using the Downloads link at the top of this page.  Then install 1.4.3 in the same folder as an *upgrade* installation, following the directions in the docs (linked at the top of the page as well) for upgrading.  This will overwrite the files with pristine versions of the latest release.  Your database will be updated, and you won't lose any of your files or settings if you follow the upgrade instructions.  I assume the upgrade will change the theme to "classic".
Logged
Pages: [1] 2 3   Go Up
 

Page created in 0.026 seconds with 20 queries.