Right now if you need to import configurations from a custom path, for example, inside a install profile you have to write a relatively complex script to cover logic to manage required modules and components to process.

We need a high level abstraction way to import configuration files in this context.

CommentFileSizeAuthor
#11 1805064.11.patch1.39 KBgdrupal
#2 1805064.2.patch1.73 KBgdrupal

Comments

lucascaro’s picture

pretty please make it a drupal-esque function like configurations_import_directory($path);

gdrupal’s picture

Status: Active » Needs review
StatusFileSize
new1.73 KB
lucascaro’s picture

I think the message handling should be left to the function calling this one (i.e. I might want to not display any messages, or customize the messages somehow). We could just return $result and let the caller decide if / what messages to show.
What do you think?

gdrupal’s picture

Status: Needs review » Fixed
lucascaro’s picture

Status: Fixed » Needs work

this function doesn't work:

PHP Fatal error:  Class 'Configuration' not found in /home/lucas/checkout/wpp_profile/modules/contrib/configuration/configuration.module on line 1154

It need the use statement at the beginning of the file.

gdrupal’s picture

@lucascaro This is working for me... it remains me to a previous issue we were having on Friday... perhaps you are dealing with a duplicated configuration code? 2 modules? The use sentence is on top of the configuration.module should not fail.. :s

gdrupal’s picture

By the way.. yeap you are right about the messages.. sorry i did not see your post... (damn phone internet)

lucascaro’s picture

no, I just applied the patch to the -dev version which was not updated yet.

dagmar’s picture

Also, this patch broke the coding standards http://qa.drupal.org/pifr/test/316978#tabset-tab-4.

lucascaro’s picture

Well, removing the messages will kill two birds with one stone ;)

gdrupal’s picture

Status: Needs work » Needs review
StatusFileSize
new1.39 KB

@lucascaro Here I removed the messages but I can't replicate the class not found issue.

lucascaro’s picture

Status: Needs review » Reviewed & tested by the community

Lookin' good

gdrupal’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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