Ticket #176 (closed defect: fixed)

Opened 07/03/08 14:55:45 (3 months ago)

Last modified 07/09/08 19:05:51 (3 months ago)

Unable to leave comments in revision 550

Reported by: Eric Owned by: mike
Priority: normal Milestone: 1.0
Component: General Version:
Severity: normal Keywords:
Cc:

Description

Trying to leave a comment on a picture in revision 550 produces the following error:

Warning: require_once(plog-load-config.php) [function.require-once]: failed to open stream: No such file or directory in /storage/mijndomein/users/043885/public/sites/www.asrhors.nl/plogger/plog-includes/plog-comment.php on line 3

At the moment, line 3 in plog-comment.php reads:

require_once("plog-load_config.php");

This should probably be:

require_once(PLOGGER_DIR."plog-load-config.php");

...although in other places a construction using dirname(__FILE__) is used.

Change History

  Changed 07/03/08 16:02:26 (3 months ago) by sidtheduck

  • status changed from new to closed
  • resolution set to fixed

fixed in r551. I must have missed the plog-comment file when moving everything around.

PLOGGER_DIR only works after it has been defined in plog-globals.php (which is included in the file plog-load-config.php), so whenever including plog-load-config.php (or plog-globals.php by itself), you need to use the dirname(FILE) construction.

follow-up: ↓ 4   Changed 07/04/08 03:12:29 (3 months ago) by Eric

  • status changed from closed to reopened
  • resolution fixed deleted

This fix doesn't seem to work. Using PLOGGER_DIR does work here; the config has been loaded when plogger_display_comments() is called.

Actually, that raises the question whether the config actually has to be loaded again here. Posting comments seems to work fine without line 3.

  Changed 07/04/08 03:17:52 (3 months ago) by Eric

Oops, I meant "when plog-comment.php is called".

in reply to: ↑ 2 ; follow-up: ↓ 5   Changed 07/04/08 12:51:17 (3 months ago) by sidtheduck

Replying to Eric:

This fix doesn't seem to work. Using PLOGGER_DIR does work here; the config has been loaded when plogger_display_comments() is called.

Nuts, I missed the directory separator slash that dirname removes from the end of the string. I'll add it back to the SVN

Replying to Eric:

Actually, that raises the question whether the config actually has to be loaded again here. Posting comments seems to work fine without line 3.

You are correct that now plog-comment.php probably does not need to have the config loaded (or any of the files that now reside in the plog-includes folder. We should update those files that if linked to directly instead of being included produce an error message and abort the script.

in reply to: ↑ 4   Changed 07/06/08 13:45:23 (3 months ago) by kimparsell

Replying to sidtheduck:

Nuts, I missed the directory separator slash that dirname removes from the end of the string. I'll add it back to the SVN.

I just got the same error as Eric - did a new install to test out the changes that I made to the admin section, and am unable to leave a comment. I've got the latest change files from rev551.

  Changed 07/07/08 14:59:48 (3 months ago) by sidtheduck

now this should be fixed as of r552. I removed the require command and added some code to all the include files to stop people from linking directly to included files as well.

We could probably add some additional code to verify that the plog-load-config file has been loaded previously or exit if not there (similar to the install-functions.php).

  Changed 07/09/08 19:05:51 (3 months ago) by sidtheduck

  • status changed from reopened to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.