Forums / Developer / Problems with advanced search and custom extension

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.

eZ debug

Timing: Jan 18 2025 19:21:44
Script start
Timing: Jan 18 2025 19:21:44
Module start 'content'
Timing: Jan 18 2025 19:21:44
Module end 'content'
Timing: Jan 18 2025 19:21:44
Script end

Main resources:

Total runtime0.2176 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 589.4609180.8125
Module start 'content' 0.00770.0066 770.273493.8203
Module end 'content' 0.01430.2032 864.0938523.1250
Script end 0.2175  1,387.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00442.0130200.0002
Check MTime0.00160.7191200.0001
Mysql Total
Database connection0.00100.467810.0010
Mysqli_queries0.165376.00281410.0012
Looping result0.00200.91221390.0000
Template Total0.202393.010.2023
Template load0.00100.464310.0010
Template processing0.201392.539410.2013
Override
Cache load0.00070.318010.0007
Sytem overhead
Fetch class attribute can translate value0.00160.745510.0016
XML
Image XML parsing0.00030.129610.0003
General
dbfile0.00231.0610200.0001
String conversion0.00000.002630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

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

Time used to render debug report: 0.0002 secs