Page MenuHomePhabricator

Error with $edgDirectoryPath
Closed, ResolvedPublic

Description

Hi,
I try to use $edgDirectoryPath but I face some issues.
It works perfectly with $edgFilePath but not with $edgDirectoryPath

Versions installed :
Mediawiki 1.29
ExternalData 1.8.3

As per recommendations in https://www.mediawiki.org/wiki/Extension:External_Data##get_file_data_-_retrieve_files_on_the_local_server

Using in LocalSetting : $edgFilePath['DirID'] = "MySources/TestFile.csv";
With the following code in the page :
{{#get_file_data:
file=DirID
...
it works perfectly and displays data in the table.

I using the following code with the same place of the directory and csv file :
in LocalSettings : $edgDirectoryPath['DirID'] = "MySources";
in the Wiki page :
{{#get_file_data:
directory=DirID

file name=TestFile.csv

...
Returns error message :
The returned error is : Error: File name "TestFile.csv" is not allowed for directory ID "DirID".
(I retrieved 'file=' as it produces the error : Error: No file is set for ID "".

Seen https://www.mediawiki.org/wiki/Extension_talk:External_Data/Archive_2014#Directory_Path_doesn't_work
no other idea identified
Should add an additionnal command in LocalSettings ? Or is it really a bugg ?

Thanks for help !

Christophe

Event Timeline

Hi @Marquerose, thanks for taking the time to report this!
Which exact MediaWiki version is this about? Please see https://mediawiki.org/wiki/How_to_report_a_bug for required information and structure. Thanks!

@Marquerose: Did Yaron_Koren agree to be set as assignee of this task? (Also note that version 1.29 will become unsupported this month.)

@Aklapper - I'm fine with being assigned this task. And External Data still supports MW versions as far as back as 1.23, for what it's worth.

Thanks for you messageBest regardsChristophe

Envoyé depuis mon smartphone Samsung Galaxy.

  • Message d'origine --------De : Yaron_Koren <no-reply@phabricator.wikimedia.org> Date : 09/09/2018 02:57 (GMT+02:00) À : cppsax@gmail.com Objet : [Maniphest] [Commented On] T203743: Error with $edgDirectoryPath

Yaron_Koren added a comment.

@Aklapper - I'm fine with being assigned this task. And External Data still supports MW versions as far as back as 1.23, for what it's worth.
TASK DETAILhttps://phabricator.wikimedia.org/T203743
EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Yaron_Koren
Cc: Marquerose, Aklapper, Kc5vcx

@Marquerose - sorry for the delay. I'm guessing that you have the same problem that the person you linked to in the talk page had - that the specified directory is not the full path. Is that possible?

@Yaron_Koren - Thanks for your reply. Yes seems to be the same problem.

@Marquerose, after updating *ExternalData*, is there still an error?

Aklapper added a subscriber: Yaron_Koren.

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)

Closing this task as, most probaly, resolved during the recent refactoring.