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.

eZ debug

Timing: Jan 20 2025 06:02:30
Script start
Timing: Jan 20 2025 06:02:30
Module start 'layout'
Timing: Jan 20 2025 06:02:30
Module start 'content'
Timing: Jan 20 2025 06:02:31
Module end 'content'
Timing: Jan 20 2025 06:02:31
Script end

Main resources:

Total runtime1.0392 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.2891152.6406
Module start 'layout' 0.00620.0031 741.929739.4766
Module start 'content' 0.00931.0285 781.4063441.9844
Module end 'content' 1.03780.0015 1,223.39068.1250
Script end 1.0392  1,231.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.4649160.0003
Check MTime0.00190.1827160.0001
Mysql Total
Database connection0.00070.067210.0007
Mysqli_queries0.986094.8808460.0214
Looping result0.00050.0494440.0000
Template Total0.998696.120.4993
Template load0.00400.383520.0020
Template processing0.994695.701520.4973
Template load and register function0.00020.016110.0002
states
state_id_array0.00210.205210.0021
state_identifier_array0.00190.181120.0009
Override
Cache load0.00350.3337220.0002
Sytem overhead
Fetch class attribute can translate value0.00070.064310.0007
Fetch class attribute name0.00080.074210.0008
XML
Image XML parsing0.00010.010810.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00320.3095100.0003
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs