Closed (fixed)
Project:
elFinder file manager
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
20 Mar 2013 at 16:08 UTC
Updated:
19 Aug 2015 at 15:55 UTC
Jump to comment: Most recent
In a volume path, the one tokens that seem to replace are the User tokens; Node tokens, such as [node;nid] do not replace. I am using elFinder in a panel and the panel does have the node id as I can use it on the panel as a title for example (%node). In elFinder, if I put the path in as "lovelyFiles/[node:nid]", the directory that gets created in the path is literally called "[node:nid]". I tried with "lovelyFiles/[user:uid]" and that correctly creates a directory named with the current user.
Is there a trick to getting the node replacement tokens to work?
Comments
Comment #1
Cookie.Monster commentedAn update, I put some debugging into elfinder.module and this line does not return anything from the node_load function
Comment #2
Cookie.Monster commentedDigging into it more and node_load needs to take a node id, not a uid. I am trying to find out how to get the current node and I've followed a few suggestions such as:
$node = node_load(arg(1));$node = menu_get_object();but both are empty. I don't know enough about loading nodes into modules to know if I'm on the right track. I'll keep digging though but would appreciate some help. Without this, I can't use elFinder. :(
Comment #3
Cookie.Monster commentedI got it working for my situation. I had to replace
line 1049:
$node = node_load($user->uid);with:
I can't say this solution will work for everyone as I need it in particular for use with OG. And having the ability to use it with OG is a very useful feature I think.
I do believe that sending the user UID in the noad_load in line 1049 as an argument though is not correct? So, I'm still leaving this a bug so the maintainer can take a look and see what he/she thinks.
Comment #4
ph0enix commentedComment #6
ph0enix commentedThank You for the patch!