Problems with advanced search and custom extension

Author Message

David Syers

Friday 10 October 2003 8:14:10 am

I don't know if anyone else has come across this problem before, but I could not find anything using the search.

I have created a custom fetch function called "common" in a module called "external_actions". This fetch function is used to read a table of application variables to decide if logged in users should be tracked amount other things. It also as default it accesses the $_SESSION variable and extracts the LastAccessesURI and extracts the NodeID from it. This is then returned in the variable "ext_session_node_id" and this is used to find out the section_id to display the correct pagelayout template.

This is working fine on every other page on the site, including the normal site search. But the moment I try the advanced search I get the following error:

Fatal error: Call to undefined function: attribute() in /home/f/web_sites/Development/ezpublish/kernel/classes/ezcontentobjecttreenode.php on line 779
Fatal error: eZ publish did not finish it's request

Any help would be very much appreciated.

David Syers

Tuesday 14 October 2003 4:52:13 am

Well it turns out that in the end it was not my custom extension at all.

The problem lay in one of my templates where I had accidently passed an array as a fetch function parameter instead of the array value.

David Syers

Tuesday 14 October 2003 7:48:39 am

Now it turns out that I was a bit hasty earlier and it turns out that I was passing the correct value (I just mistook it for an array at first).

There is a bug with the |reverse operator when you are under the advanced search.

ie. If $node.path_array was equal to array(1,2,47,94) and you did

{set node_array_reversed=$node.path_array|reverse}

under any other view (as far as I am aware anyway) you would expect $node_array_reversed to be:

array(94,47,2,1)

However under the advanced search you get

yarrA

So it looks like under the advanced search |reverse is returning the type text "Array" reversed.

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 31 2025 06:21:09
Script start
Timing: Jan 31 2025 06:21:09
Module start 'layout'
Timing: Jan 31 2025 06:21:09
Module start 'content'
Timing: Jan 31 2025 06:21:09
Module end 'content'
Timing: Jan 31 2025 06:21:09
Script end

Main resources:

Total runtime0.0151 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.2656151.2266
Module start 'layout' 0.00550.0028 739.492236.6953
Module start 'content' 0.00830.0052 776.187590.0781
Module end 'content' 0.01350.0016 866.265633.9922
Script end 0.0151  900.2578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002315.3258140.0002
Check MTime0.00117.1469140.0001
Mysql Total
Database connection0.00117.369110.0011
Mysqli_queries0.002415.959230.0008
Looping result0.00000.093010.0000
Template Total0.00128.110.0012
Template load0.00085.498810.0008
Template processing0.00042.524110.0004
Override
Cache load0.00053.469510.0005
General
dbfile0.00042.328780.0000
String conversion0.00000.052040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs