Needs review
Project:
Spaces
Version:
6.x-3.6
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2010 at 19:13 UTC
Updated:
21 Aug 2013 at 10:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
glennpratt commentedThis patch just checks for a variable (and deletes it on uninstall, which might be overkill since I don't ever create it).
Comment #2
glennpratt commentedOh yeah, needs review...
Comment #3
jmiccolis commentedBumping the priority of this one. I'm not sure I like using a variable to store this stuff, but I can see the need to have a way to change these paths.
Comment #4
glennpratt commentedHow about a drupal_alter() over a variable_get()?
Modules would implement something like hook_spaces_purl_excluded_paths_alter().
If so, I'll try to re-roll.
Comment #5
jmiccolis commentedSo, I took another look here and currently to do this by extending a Space type class, and altering the registry.
For example you could extend `space_og` and then implement `hook_spaces_registry_alter()` to have all OG spaces use your class and not the default one.
Does that work for you?
Comment #6
randallknutson commentedIt is very nice on a development server to be able to disable this for "admin" when developing views. This allows us to test a view in preview while inside a space. It is a little weird but works. Essentially we comment out the line with "admin" and then go to {url}/{purl}/admin/build/views/edit/{viewname}
I'd also find this very useful if we could add additional paths like the payment processor and ajax callbacks that tend to break within spaces. Variables seem like a good way to do this as it will probably need to be fairly variable.
Comment #8
glennpratt commentedThis doesn't really work cleanly, since we use more than one space, and it would be messy to maintain, especially for a contrib module.
If you are confident this won't change, we will implement as you suggest.
Re-roll attached.
Comment #9
glennpratt commentedWhoops, extra patch in there.
Comment #10
christianchristensen commentedsubscribe - this is invaluable for debugging/working with views in spaces!
Comment #11
hefox commentedInvisible variables are a bit meh. This should likely have a settings page. However, the information would likely be stored in a string instead of an array in that case unless the submission is handled custom (ie not using system_settings_form).
Other than that, agree that it would be a useful functionality for features to have out of the box; I can think of a few paths I'd want to exclude.
edit: I disagree with myself; whatever the setting form is, as long as it doesn't use system_settings_form, it can do the explode then variable_set there. screw exploding on each check.
Comment #12
Grayside commenteddrupal_match_path() will process a string a la block visibility paths with no explosions anywhere.
Comment #13
glennpratt commentedYeah, for consistency, I would probably move this to drupal_match_path() if we wan't to expose it, then it would work like the block and context path settings.
Comment #14
hefox commentedComment #15
Grayside commentedAlso, I'm not sure if you should allow anyone to remove the existing blacklisted paths. Those should perhaps be added to whatever the variable contains.
Comment #16
hefox commentedSomeone expressed the desire to remove /admin temporarily; it seems with enough warning that it is desired
Comment #17
Grayside commentedMaybe control over the cooked in paths should be done via separate UI, such as checkboxes. That way you can provide the option, but not risk a misclick delete creating unexpected behaviors.
Comment #18
MrMaksimize commentedI like having the overrides in settings personally. that way they can be version controlled :)
Comment #19
Grayside commentedAttached file is more or less a reroll of #9, except now it expects newline delimited paths as standard output from excluded_paths().
I was looking at how to provide a UI, and I'm thinking this should go somewhere around admin/build/spaces. This seems like a confusing and therefore dangerous setting to expose at /features. As there is no facility for spaces type plugins to introduce configuration, I stopped there. And added #1327092: Add a Spaces configuration page for non-preset related settings.
Comment #20
pdrake commentedAttached is a re-roll of #19 against 6.x-3.3, integrated with the patch from http://drupal.org/node/933634#comment-5412508. The reason I integrated these two patches is that the issues are related and touch the same lines of code.
Comment #21
pdrake commentedIn the above patch, I overlooked the incompatibility between the patch from issue #933634 and the change in #19 to a string with newline separators. That change is also incompatible with class space_og, so this patch changes the return from excluded_paths back to an array.
Comment #22
pebosi commentedIs there any reason to dont allow "admin" path's on a space? Or why we should not simply remove "admin" and "admin/*" from the returned array?
Regards