dinamic paths and urls stored in the database ??

Author Message

Alexandre Cunha

Tuesday 21 September 2004 7:03:43 pm

Hi,

Have started a new site using the default PLAIN site included in the default instalation.

The default storage folder for images is var/plain/storage
When I decided move the site to other machine, i changed the site name from "plain" to "my_site"
Have changed the site.ini.append to point the new "var/my_syte"
With this, my new storage has changed to "var/my_site/storage"

After this, no images are loaded. Looking in the html and in the database (table ezcontentobject_attribute), i see the xml fot the image. Something like this:

<?xml version="1.0" encoding="UTF-8"?>
<ezimage serial_number="1"
         is_valid="1"
         filename="termas1.png"
         suffix="png"
         basename="termas1"
         dirpath="var/plain/storage/images-versioned/667/1-por-PT"
         url="var/plain/storage/images-versioned/667/1-por-PT/termas1.png"
         original_filename="085.png"
         mime_type="image/png"
...

You can see the dirpath and url pointing to the OLD "plain" folder.
Humm ... a dinamic path stored in the database ??

Some questions:

a) There is a simple way to change all ocorrences on the database from "plain" to "my_site" ?
b) Why the xml stores this info ? Why not

         dirpath="images-versioned/667/1-por-PT"
         url="images-versioned/667/1-por-PT/termas1.png"

instead of:

         dirpath="var/plain/storage/images-versioned/667/1-por-PT"
         url="var/plain/storage/images-versioned/667/1-por-PT/termas1.png"

c) I dont see any valid reason to store the /var/<site_name>/storage in the xml. There is a valid reason ? If not, I will report this as bug.

using ezp 3.4.1

thanks for your help

http://AlexandreCunha.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.