Hi. Tried this out with views 6.x-2.8 & got this error:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'theme_views_tree' was given in ....\includes\theme.inc on line 656.

Any ideas?

Comments

timefor’s picture

Yeah me too. This doesn't seem to be working at all.

ram327’s picture

Same issue:
warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'theme_views_tree' not found or invalid function name in /var/www/game/includes/theme.inc on line 656.

drupup’s picture

Same here. This module would be a great addition, but it doesn't appear to be quite there yet. Hope you put the time in to get it the rest of the way...it would be a most useful addition.

timefor’s picture

I ended up using Views hierarchy and adding jQuery treeView on top of it in the template.

http://jquery.bassistance.de/treeview/demo/

I imagine that was what this module was attempting to do. It wasn't exactly straight forward as I needed to add the id of treeview to the top UL to the make the thing work. I ended up hard coding the first level in the theme and used the rest of the output from Views hierarchy.

Though it would be nice to see this module working for future projects.

Crell’s picture

I have gotten really, REALLY tired of the theme system. The theme system / views interaction in Drupal is broken. It's been broken for a year despite numerous patches to fix it. This happens all the bloody time.

The next version of Views cycle will give up on trying to optimize theme function location because core is broken and attempts to fix it have failed.

Despite that... I don't get this error at all. :-) Please try it with the newest stable of Views (2.11 as of this writing).

druppelsimon’s picture

Had the same issue, but a cache refresh fixed it. I'm using Views 6.x-2.11 and Views Tree 6.x-1.0

Correction... it works for one request when refreshing the cache...

Update: Another issue that was marked as duplicate of this actually has the solution: http://drupal.org/node/810116#comment-3057924

sun’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new1.92 KB

That's not really a surprise. @Crell: Not sure why you don't get any warnings, but you obviously should.

sun’s picture

Status: Reviewed & tested by the community » Needs work

um, hold on.

sun’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.78 KB

Rather this patch.

lal2017’s picture

I had the same problem: on running the view with the Tree style plugin.

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'theme_views_tree' was given in /home2/neutralm/public_html/cgpi/includes/theme.inc on line 656.

Also found error in Theme:Information:
Style output: views-tree.tpl.php (File not found, in folder sites/all/modules/views_tree/),

Tried installing: 6.x-2.x-dev after deleting Tree View 6.1 version.
After install, couldn't see the Tree-View Style plugin in Vews.

Stuck..?

lal2017’s picture

OK I deleted the Tree View 6.x-2.x-dev and reverted back to Tree View 6.x-1.0 module. Now I can select the plugin again but I get no error. No result what so ever - it doesnt return any result. Both of the above errors are now missing. ???

geek-merlin’s picture

this seems to be another dup of #812070: When using the view no output is shown - looking in the view "Theme: Information" shows no style for "views-tree.tpl.php".

i can confirm that applying sun's patch (and clearing cache) solves the problem for me: http://drupal.org/node/828750#comment-3367396

blainelang’s picture

Getting same error using 1.x stable (Apr 08) and have tried as well with Sun's patch #9 above.

In my case, I have a single table with fields id and pid (parent id) and I want to show the listing of records in a tree view. Is that possible with this view plugin?

I have the main field mapped to id and parent field mapped to pid.

blainelang’s picture

Sorry, could have sworn I had cleared cache but doing so has me now seeing a tree view listing for the first time.

sun’s picture

@Crell: Any chance to commit this?

Crell’s picture

Status: Reviewed & tested by the community » Fixed

From the commit message I just wrote: To hell with the theme system. I'm just putting the theme functions in the .module file.

Should be self-explanatory. :-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

my-family’s picture

StatusFileSize
new3.17 KB

I think that I have to reopen this issue.
I had the problem described above as well. However, I am not able to fix it as described.
After applying #9 patch to 6.x-1.0 or if using last -dev version I get the error on the view page (page display) and the same with automatic preview:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator [e-mail] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

(record from the error log: "Premature end of script headers: php")

On local server I have (probably the same) problem, with the message: Connection closed by remote server. You tried to access the address [the view page path], which is currently unavailable. Please make sure that the web address (URL) is correctly spelled and punctuated, then try reloading the page.

And when trying to show preview: "An error occured at admin/build/views/ajax/preview/[name_of_the_view]

View export is attached.

Thank you in advance for help.

digital_fox’s picture

yes, I have this problem too

blainelang’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Closed (fixed) » Active

SPAM LINK above - please remove.

geek-merlin’s picture

subscribe

Shadlington’s picture

Same problem here!

tema’s picture

Confirm and subscribe.

Renee S’s picture

Cooonfirm. And subscribe.

tchurch’s picture

subscribe

Wes Ashworth’s picture

yep

greg.1.anderson’s picture

I had this issue with 6.x-1.0; upgrading to 6.x-2.x-dev (2011-Feb-24) cleared up the problem.

#18 is a completely different issue; I am going to open a new incident for it.

greg.1.anderson’s picture

Status: Active » Fixed

Created #1161822: Selecting a non-numeric "main type" is bad for the health of your tree view., which describes what is going on in #18 & c.

Subscribers to this issue take note -- do not blindly apply the patch on the other issue and expect it will solve your problem; you must understand how the main field and parent field relate in order to make your tree view work correctly.

Marking 'fixed' again per #16.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.