Page 1 of 1

Adding media from entry causes error

Posted: Mon Aug 01, 2005 4:39 am
by wesley
It's not a fatal error (i.e. doesn't hinder the operations) but nevertheless
the server records the errors and I don't want these errors piling up.

Okay, when clicking 'Media' button when editing the entry to add a media
file in the entry, the following errors are recorded on my Apache error.log:
[Mon Aug 1 00:09:05 2005] [error] [client (IP address)] File does not exist: /(serendipity install path)/templates/default/admin/{TEMPLATE_PATH}img/background.jpg
[Mon Aug 1 00:09:05 2005] [error] [client (IP address)] File does not exist: /(serendipity install path)/templates/default/admin/{TEMPLATE_PATH}img/button_background.png
(Yes, I masked the IP address and the serendipity install path)

When 'Media' button is pressed, it loads 'serendipity_admin_image_selector.php'
into a popup page. That file would load style.css in 'admin' folder of the
template... but somehow the smarty directives inside that css file doesn't
get processed and as you can see it would just try loading a nonexistent

/templates/default/admin/{TEMPLATE_PATH}img/background.jpg

instead of the actual

/templates/default/admin/img/background.jpg

file. What's going on, I wonder?

Re: Adding media from entry causes error

Posted: Mon Aug 01, 2005 12:43 pm
by garvinhicking
Can you try to replace in serendipity_admin_image_selector.php:

Code: Select all

<link rel="stylesheet" type="text/css" href="<?php echo serendipity_getTemplateFile('admin/style.css') ?>" />
with

Code: Select all

<link rel="stylesheet" type="text/css" href="<?php echo serendipity_rewriteURL('serendipity_admin.css'); ?>" />
(I also will commit this)

Regards,
Garvin

Posted: Mon Aug 01, 2005 3:34 pm
by wesley
That seems to do the trick. Thanks!