Adding media from entry causes error

Found a bug? Tell us!!
Post Reply
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Adding media from entry causes error

Post 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?
I make s9y plugins, too.
My s9y blog depends on them. :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding media from entry causes error

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Post by wesley »

That seems to do the trick. Thanks!
I make s9y plugins, too.
My s9y blog depends on them. :)
Post Reply