Does not work as in video. I tested with clean install of latest Open Atrium and all nodes are same, if I change blocks on one node, others nodes gets changes too. Am I missing something?

Comments

henrijs.seso’s picture

Title: does not work » does not work as in video
Category: bug » support

So I added some dsm() to function spaces_node_init(). $node is loaded, $space is NULL, dashboard is string 'promo' and $context is some object with name 'spaces_dashboard-promo'. Anyways, I'm not super Drupal expert but empty $space and changes saving for ALL nodes tells me that video is overly optimistic and clean Atrium install needs some more configuration steps. Could someone point me right direction? Thanks!

Right now instructions are:

1) install module
2) create content type and check checkbox
3) add context 'spaces_dashboard-promo'

So what should I do between steps 2 and 3 to get this to work? I suspect some Spaces configuration magic is missing.

henrijs.seso’s picture

Category: support » bug

I found a bug, in function spaces_node_spaces_registry() line 'path' => 'node/%', should probably be 'path' => 'node/%node' as in OG example. This loads $space properly in function spaces_node_init(). Changes are still saved globally for all promo nodes.

henrijs.seso’s picture

Yes, finally. You have to add node type condition to context 'spaces_dashboard-promo' so its loaded for content type 'promo'. Thats missing from video! It works in OA now. Bug still needs fixing thou.

randallknutson’s picture

LavaMe,

I'm pretty sure I mentioned in the video that you need to add a context with the name 'spaces-dashboard-promo'. You shouldn't need to add a node type condition to it as it is automatically enabled but if it works for you I wouldn't change it.

If you could submit a patch with the changes it would be much appreciated.

henrijs.seso’s picture

Category: bug » support
Priority: Critical » Normal

There is probably a bug, if you say, that "it is automatically enabled", because it is not in my case, but adding node type condition will make magic happen, so its not a bug, just tip for someone who could run in trouble.

smk-ka’s picture

I think this could be related to #901038: spaces_dashboard_page uses unloaded context on first load (the first of the two patches): when a new context is automatically created, context_save() doesn't update the passed object, therefore it needs to be manually reloaded after saving. As an alternative, the second patch fixes context_save() to do the reload for you. As the author writes, both patches achieve the same result.

julien’s picture

Yes i confirm, it doesn't work as the video shows.
On OpenAtrium you need to add the plugin in sites/profiles/openatrium/modules/contrib/spaces/