Attribute filter on ezobjectrelation solution??? (ez systems crew???)

Author Message

Willie Seabrook

Monday 29 March 2004 5:07:28 pm

Hi,

As I understand it (I tested) attribute filter does not work on the ezobjectrelation datatype in the current release of ezpublish.

So I executed the following sql script:

UPDATE ezcontentobject_attribute SET sort_key_int=data_int WHERE contentclassattribute IN (187)

Where 187 is the id of the ezobjectrelation contentclassattribute that I need to be able to do an attribute filter on. I had to execute this manually because adding 'ezobjectrelation' to the appropriate array in updateattributefilter.php didn't do anything for some reason (anyone know why?)

Now I can do an attribute filter on that ezobjectrelation filter. In order to have the sort_key_int updated when a *new* attribute is added do I add the following code:?

ezobjectrelationtype.php:

function sortKey($contentObjectAttribute) {
return $contentObjectAttribute->attribute('data_int');
}

function sortKeyType() {
return 'int';
}

Will this have the intended effect? Also, might this have any adverse side affects anywhere else in ezpublish? I havn't seen any as yet, I just thought that the solution was so simple, and since ez systems hasn't added it it may be because a much more complex solution is required.

Anyone in the ez systems crew want to comment on this (I doubt anyone else will know).

Regards,
Willie

 

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 19 2025 09:04:50
Script start
Timing: Jan 19 2025 09:04:50
Module start 'layout'
Timing: Jan 19 2025 09:04:50
Module start 'content'
Timing: Jan 19 2025 09:04:51
Module end 'content'
Timing: Jan 19 2025 09:04:51
Script end

Main resources:

Total runtime1.0797 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.0054 589.4141152.6563
Module start 'layout' 0.00540.0033 742.070339.5078
Module start 'content' 0.00871.0694 781.5781408.6797
Module end 'content' 1.07810.0016 1,190.25788.0938
Script end 1.0797  1,198.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3293160.0002
Check MTime0.00140.1316160.0001
Mysql Total
Database connection0.00050.050610.0005
Mysqli_queries1.035095.8582460.0225
Looping result0.00050.0441440.0000
Template Total1.044896.820.5224
Template load0.00210.196120.0011
Template processing1.042696.562820.5213
Template load and register function0.00020.020410.0002
states
state_id_array0.00130.116710.0013
state_identifier_array0.00180.164720.0009
Override
Cache load0.00170.1593210.0001
Sytem overhead
Fetch class attribute can translate value0.00080.069810.0008
Fetch class attribute name0.00080.074510.0008
XML
Image XML parsing0.00020.013910.0002
class_abstraction
Instantiating content class attribute0.00000.000810.0000
General
dbfile0.00080.0701100.0001
String conversion0.00000.000740.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
4content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs