Domain Access 6.x-2.0 and Views 2

nirvanajyothi - October 11, 2008 - 07:42
Project:Domain Access
Version:6.x-2.0-rc6
Component:- Domain Views
Category:feature request
Priority:normal
Assigned:nonsie
Status:closed
Description

Will Domain Access 6.x-2.0 be Views 2 compatible?

#1

nirvanajyothi - October 11, 2008 - 07:44

I am using Views 2 latest rc and would like to use Domain Views.But it is not possible with DA 6.x-1.2,rite?

#2

agentrickard - October 11, 2008 - 12:53
Component:Miscellaneous» - Domain Views
Category:support request» feature request

The final release will be Views 2 compatible. The current release is not.

Assistance (patches) would be appreciated.

#3

nonsie - October 11, 2008 - 17:21

#4

agentrickard - October 12, 2008 - 16:17

This is now in testing in HEAD. Very unstable.

See also #320257: Move $domain->user data to own table and #320064: Move the default domain into the database which both make Domain Access more 'Views friendly.'

#5

nonsie - October 29, 2008 - 00:32

I've started to work on Views 2, at the moment there's no support for anything "current" (similar to current user's default language for node->language). I'm not sure what to name these filters, any help would be appreciated.

#6

agentrickard - October 29, 2008 - 14:46

@nonsie

How is that relevant to DA? And are you working along with the code in HEAD or doing something else?

#7

nonsie - October 29, 2008 - 16:59

I checked out the code from HEAD based on #4.
Let me rephrase my question - at the moment domain_id filter is a numeric field while old DA Views allowed user's to choose one or more specific domains or current domain (dynamic value based on the domain the view is rendered on). What I'm most interested in is being able to filter nodes that are published to:
1. current domain
2. current domain or all affiliates
3. any domain

Views used to have node translation in node group, now it has been moved to a separate group called node translation. Should DA use a different grouping for filters/fields dealing with dynamic values (current domain, current user's domain etc)?

For my own purposes I could create it any way I could possibly come up with but I'd rather write something everyone can use.

#8

agentrickard - October 29, 2008 - 17:38
Version:6.x-2.0-rc3» 6.x-2.0-rc4

Those are the questions where I stopped, since Views uses OO code for custom handlers now, and I have to learn how to make that work correctly.

My suggestion is to submit patches that get the functionality that you are after. Then I/we will standardize and generalize them for release.

#9

nonsie - October 30, 2008 - 01:20

Added currently active domain and any domain to domain_id and gid filters. Also added an additional filter for content available on currently active domain (either published to the domain or all affiliates).

Still no support for arguments.

Edit: for some reason include files were left out

AttachmentSize
domain_views_filters.patch 3.44 KB
includes.zip 1.59 KB

#10

agentrickard - October 30, 2008 - 18:48
Status:active» needs work

#11

agentrickard - November 6, 2008 - 16:30
Status:needs work» needs review

OK. Patch applies and things seem to work. I have not tested heavily but will commit and release rc5 so we can get more feedback.

#12

nonsie - November 6, 2008 - 17:17

Could you update Domain Views description on the project page? rc5 is compatible with Views 6.x.2.0.

#13

agentrickard - November 6, 2008 - 17:44

Done.

#14

Crell - November 24, 2008 - 21:08

I can confirm that the "in current domain" filter at least appears to work in RC5. I've not tested the other bits yet.

#15

agentrickard - February 23, 2009 - 15:24
Version:6.x-2.0-rc4» 6.x-2.0-rc6
Status:needs review» needs work

Still more to be done here....

#16

agentrickard - March 24, 2009 - 21:37

A patch which removes the extraneous filter by null (not needed in Views 2) and adds stub support for {domain_editor}.

AttachmentSize
319876-views.patch 5.14 KB

#17

nwilets - March 30, 2009 - 18:18

Domain and Domain ID arguments are missing in Views 2.

It would be great to have these back when you guys have the chance. Thanks.

#18

verlierer - April 6, 2009 - 17:46

is this patch applied to rc6?

#19

agentrickard - April 6, 2009 - 18:09

That latest patch is against HEAD, but should apply to rc6.

#20

nonsie - April 23, 2009 - 00:52

Patch from #16 plus:
- argument handling
- output sitename field as single or multiple values (see #405084: "Publish to" as a field in Views). Similar approach should probably also exist for all other fields. Optionally link this output to the node on default domain or the domain the node is published to).

I am not sure if the approach to handle multiple values is indeed the correct way of doing this. I've based my code on taxonomy multiple term handling and CCK views support.

AttachmentSize
319876_domain_views.patch 15.64 KB

#21

nonsie - April 23, 2009 - 00:51
Assigned to:Anonymous» nonsie
Status:needs work» needs review

#22

agentrickard - April 23, 2009 - 13:55

Small note -- the patch file had Windows line breaks. It still applied, but this is something we will have to watch carefully.

Attached is a reformatted version of the patch -- no changes, just the creation of the new files inside the 'includes' directory where they belong, and with Unix linebreaks.

Nothing seems to be broken by the patch, but I have not had a chance to review thoroughly.

AttachmentSize
319876_domain_views.patch 16.14 KB

#23

agentrickard - April 23, 2009 - 13:58

hook_theme() requires that you list the file where the theme function resides if it is not in the same file as the hook. We might as well put that one theme function directly in the module file.

http://api.drupal.org/api/function/hook_theme

#24

agentrickard - April 23, 2009 - 21:27

Clears up some confusion by changing group names. Needs some documentation.

I say commit and move on. Let people test.

AttachmentSize
319876_domain_views.patch 17.8 KB

#25

agentrickard - April 23, 2009 - 21:43
Status:needs review» active

This last patch has been committed to HEAD. More work still, but this is much improved!

#26

agentrickard - April 28, 2009 - 17:56
Status:active» needs review

Here is a patch that adds Domain Source support, and allows domain_id fields to be output as links.

AttachmentSize
319876-source.patch 8.02 KB

#27

agentrickard - April 28, 2009 - 18:05

Revised to remove the old 'Any domain' option.

AttachmentSize
319876-source.patch 9.25 KB

#28

agentrickard - April 28, 2009 - 20:28

Revised version of the patch. Simpler. Maybe better?

AttachmentSize
319876-source.patch 8.35 KB

#29

Roger Saner - April 29, 2009 - 14:08

I couldn't get the patch doesn't apply against rc6. At least, all of it applies except for the last change to domain_views.views.inc to function domain_views_views_handlers()

patching file domain_source/domain_source.module
Hunk #1 succeeded at 193 (offset -8 lines).
patching file domain_source/domain_source.views.inc
patching file domain_views/domain_views.views.inc
Hunk #2 succeeded at 148 with fuzz 1 (offset -1 lines).
Hunk #3 succeeded at 165 with fuzz 1 (offset -58 lines).
Hunk #4 FAILED at 212.
1 out of 4 hunks FAILED -- saving rejects to file domain_views/domain_views.views.inc.rej
patching file domain_views/includes/domain_views_handler_field_domain_id.inc
patching file domain_views/includes/domain_views_handler_filter_domain_domain_id.inc
Hunk #1 succeeded at 13 (offset -2 lines).
Hunk #2 succeeded at 21 (offset -2 lines).

The contents of domain_views/domain_views.views.inc.rej are

***************
*** 209,214 ****
        'parent' => 'views_handler_argument',
      ),
      // field handlers
      'domain_views_handler_field_domain_sitename' => array(
        'parent' => 'views_handler_field',
      ),
--- 212,220 ----
        'parent' => 'views_handler_argument',
      ),
      // field handlers
+     'domain_views_handler_field_domain_id' => array(
+       'parent' => 'views_handler_field',
+     ),
      'domain_views_handler_field_domain_sitename' => array(
        'parent' => 'views_handler_field',
      ),

#30

agentrickard - April 29, 2009 - 14:27

It is a patch against HEAD.

#31

Roger Saner - April 29, 2009 - 17:58

Fair enough - thought I could apply it because in #19 you said it should apply against rc6 too.

#32

agentrickard - April 29, 2009 - 20:16

That only applied to the earlier (pre #19 patch)

#33

agentrickard - May 1, 2009 - 19:52

Patch in #28 committed to HEAD.

#34

nonsie - May 11, 2009 - 17:21
Status:needs review» reviewed & tested by the community

Patch from # seems to work as expected.

#35

drecute - May 12, 2009 - 19:17

@agentrickard and @nonsie
I don't know if you can help me out on this. I have installed the domain module and domain block module, but It seems the domain module does not work well with views on my drupal installation. My problem is that, when I administer my content with views(with a block display), I dont seem to see the views(which has a block entry on the block page) displayed on my page. But when I create content and is promoted to front page plus including domain specific display of the content, It works fine.

Is it that domain module does not work with views or what? It also seems to me that the domain module does not work with the panel module. What I did is that I added to a mini panel the content of the views which was created earlier. And when assigned to a block region, nothing is displayed.

Please I need urgent help on this. My deadline is Friday. Please @agentrickard and @nonsie

#36

agentrickard - May 12, 2009 - 20:44

@drecute

You need to open a new issue and give more details. DA works fine with both Views 2 and Panels 2.

Nesting content (a view inside a panel inside a block) may not work as expected, especially if the content is not visible on the current domain.

#37

drecute - May 13, 2009 - 15:46

@agentrickard

Thanks for the response.
I have opened a new issue at http://drupal.org/node/461576. Please kindly look through. Thanks.

#38

mrgoltra - May 24, 2009 - 07:13

subscribing.

#39

agentrickard - June 28, 2009 - 16:21
Status:reviewed & tested by the community» closed

I'm going to close this one and deal with other issues separately.

 
 

Drupal is a registered trademark of Dries Buytaert.