Closed (won't fix)
Project:
Password Policy
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 May 2012 at 10:06 UTC
Updated:
12 Jul 2014 at 20:03 UTC
Jump to comment: Most recent
Comments
Comment #1
erikwebb commentedShould we be using CTools API functions here or just a simple array_merge()? I'm trying to keep CTools out of the 7.x-1.x branch for now.
Comment #2
dixon_There's not much to leave out, it's more or less one function that we need to start utilizing instead of custom db queries and array_merge.
Basically it's
ctools_export_load_object()that we need to utilize. That function will query the table for objects that are not exported, and merge in default ones. Doing it our selfs with our own array_merge is just to complicate it I think.This will add a hard dependency on CTools but practically I don't think that's a problem since essentially everyone has CTools installed with Views these days.
Comment #3
dixon_Here's roughly what it would look like:
It's quite a simple patch to add this in. So I'll try to find some time for this.
Comment #4
erikwebb commentedI'm worried about adding in a CTools dependency at this point. I have a pattern that already does this without CTools (http://erikwebb.net/blog/drupal-design-patterns/putting-it-together) that maybe could be used instead.
I'm planning on rewriting 7.x-2.x to be fully CTools-dependent with exportables, plugins, etc.
Comment #5
dixon_Seems like a doable approach. But you've already gone down the path choosing CTools to export the object. Why not complete that path? Practically I don't think it's a problem to depend on CTools. I'd say that 99,9% of all Drupal sites is using Views, which already depends on CTools. In fact, there's more sites installed with CTools than with Views (http://drupal.org/project/usage/views and http://drupal.org/project/usage/ctools).
Just fixing this issue would make 7.x-1.x work with exportables properly. Because right now nothing shows up after installing a distribution with exported policies. It's a very broken behavior.
Comment #6
erikwebb commentedThe loading functionality was a soft dependency, so I wasn't too worried about it. You're right though, I'm being too stubborn about having the dependency.
Let's make sure we fail gracefully if it isn't installed (for some weird reason) -
Comment #7
chanac_hares commenteddixon_
thx for the solution, but can you tell me where i write this function ?
thank you
Comment #8
aohrvetpv commentedIs this not a feature request? Also, is it still active for 7.x-1.x? 7.x-2.x adds CTools integration.
Comment #9
aohrvetpv commentedI don't think this is applicable to 7.x-1.x since 7.x-2.x is intended to add CTools support. Please re-open if you think I might be mistaken.