Profile-based patterns were not working for me, because patterns appears to just use the $profile global, which is not generally set unless drupal is messing with modules. This patch sets it if it's not already.

CommentFileSizeAuthor
fix_profile.patch1007 bytesbhuga

Comments

vaish’s picture

Thanks for catching this.

It seems that now global $profile is kinda redundant and that it's enough to just leave your variable_get() line in order to have it working in all the cases. Does that makes sense to you?

Vaish

bhuga’s picture

Honestly, I'm not qualified to speak to that. I'm not sure if the variable_get works if a pattern is, for example, called during/after an install profile? The question is muddied in that Drupal took the time to define this global and only seems to set it on pages like admin/build/modules. Hard to say if we're supposed to use it or not.

I think either way will end up working out fine.

vaish’s picture

Status: Needs review » Fixed

I played with this little bit more and confirmed that in order to have this working both during the installation and after, we need global variable as well as variable_get(). Patch committed.

Thanks.

Status: Fixed » Closed (fixed)

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