Are there any plans to port this to 6.x?

Comments

wayland76’s picture

Title: Port to 6.x? » Port of viewfield to 6.x?
jdblank’s picture

Any work regarding a port to drupal 6?

Lowell’s picture

ditto: subscribing

aren cambre’s picture

Would love to see this module updated to work with D6. In case there is already progress, the Upgrade Status module (http://drupal.org/project/upgrade_status) indicates no current D6 upgrade work.

jparets’s picture

From my point of view, node reference and view field, are both important contributions to dynamic web pages (WEB2 or something like this). Both allow modelling dynamic relationships and combining them the results are very interesting.

gyver’s picture

watching this

jparets’s picture

I see the View Reference module in 6.x (but with no arguments). Is the idea to subsitute view field using View Reference?
Please a need some guide because I have to change all my design if Viewfield is not ported to 6.x.

But as I commented yet, a reference to views is one of the most powerful tools than I use in drupal. You can, for instance, adapt a view vith arguments to the user (restrict access by using arguments). Obviosuly a similar thing could be made with view_insert but is not so elegant when you are using CCK.
Thanks.

dogboy72’s picture

Title: Port of viewfield to 6.x? » How about like this?

http://drupal.org/node/246742

Until viewfield for d6, I have manually inserted views in custom tpl files.

dogboy72’s picture

Title: How about like this? » Port of viewfield to 6.x?
jparets’s picture

Thank you. I will try it.
A tried a similar solution using insert_view. The problem are arguments but can be solved using php:
An example:

#Código para mostrar las muestras del usuario actual
#mediante el módulo insert_view.
global $user;
$texto = '[view:info_mues_tabla_arg=100=' . $user->uid . ']';
return $texto;

This shows a view of nodes related to the $user->uid.

For me the main question is maintainability: using viewfield you have to selected a view and you can easily change the view in nodes of the same type. A simple quetion of editing the node.
Using the php solutions you have to write code for each node.
Viewfiled is elegant, and provide a good degree of maintainability and flexibility.
Thank you again

trofimchouk’s picture

Port port port port port port port!
Please please please please please!
Excuse me :)

davedelong’s picture

subscribing.... viewreference just isn't cutting it for me

ar-jan’s picture

Would love a port to D6 as well. Would take care of my views being in the menu system so the right item stays active, and also maintain translation relationships between nodes with views in different languages.

mroswell’s picture

Subscribing.

hunvreus’s picture

We are working on the port to Drupal 6.x, we're almost there already. It should be finished this week (maybe Thursday). So hold you breath, hopefully we'll have it running soon.

jparets’s picture

wonderful new!!!!

svihel’s picture

subscribing

hunthunthunt’s picture

@ #15 (hunvreus )

Awesome news!

Looking forward to this.

josoal’s picture

subscribing

Jehf’s picture

subscribing.

zmove’s picture

Hi,

I'm subscribing to this issue too, I hoped to see a release this week end ;)

timpolino’s picture

ditto: subscribing
it's a very import module!

moshe weitzman’s picture

I'll review and commit a worthy patch as soon as it arrives. Am looking to the community for the initial patch.

makara’s picture

Status: Active » Needs work
StatusFileSize
new29.73 KB

Hi,

This is my initial patch, based on DRUPAL-5 branch.

It works with page views now.

I have many questions/problems:

1. AFAIK each formatter has a function. Should I build formatters for different type of views, or should I make the views type as a field setting?

2. I'm not familiar with token.

3. Do we still need the custom default value settings?

4. $_viewfield_stack is not in use.

plach’s picture

Status: Needs work » Needs review
StatusFileSize
new27.4 KB

Hi, this is my attempt to provide an initial patch: I started from makara's one (excuse me, I didn't mean to overtake you but I really needed this one :) and tried to port all the original features. Now we should have a pretty functional 6.x version.

Some notices:

  • The module provides a formatter for each view display available in the current installation, but at the moment there is just one common theming function: I am not sure if there will be the need for something more advanced because I just started discovering Views 2.
  • I found a couple of problems involved with the native CCK handling of multiple values: the tabledrag.js script does not allow nested tables at the moment, so I had to move the token replacement help outside the viewfield fieldset; moreover a system.css rule set a nowrap on the table cells thus causing the description text to break outside the table borders; I fixed this with a tiny CSS file. I didn't know if these issues were to be considered bugs so I managed to fix them in the patch.

I wait for your feedback.

plach’s picture

StatusFileSize
new29.67 KB

I kept working on:

  • a small bugfix at field creation
  • some code improvement
  • a viewfield now can be shown in views using the field row style

At the moment there is a known bug: if showing the viewfield through a view using the field row style and having configured the field to use a nodereference relationship, the field will be empty (see #290682: Node reference views relationships should provide the referred node and not the referring one for details).

dogboy72’s picture

Thanks for working on this.

Unfortunately, the patch isn't working for me:

warning: file_get_contents(sites/all/modules/viewfield/viewfield.info) [function.file-get-contents]: failed to open stream: Permission denied in C:\xampp\htdocs\d6\includes\common.inc on line 3398.
warning: file_get_contents(sites/all/modules/viewfield/viewfield.info) [function.file-get-contents]: failed to open stream: Permission denied in C:\xampp\htdocs\d6\includes\common.inc on line 3398.

Probably something I'm doing wrong in applying the patch.

plach’s picture

Could you provide more information about your development environment and the way you applied the patch?
I created and tested it on Eclipse PDT 1.0.3.

Please note that the patch creates a couple of files from scratch (viewfield.css and viewfield.install) and modifies viewfield.info and viewfield.module, so you'll have to apply the patch to the whole viewfield directory.

One more thing: the patch has been created against the HEAD and not the latest stable release (5.x-1.5).

dogboy72’s picture

Sure. I'm running Drupal 6.3 on windows using xampp. I applied the patch using cygwin. I am not experinced with patches - have only done it a few times but this is the first time I've had a problem.

I think my problem is probably related to finding the correct version of head. From the CVS repository I found this version:

$Id: viewfield.module,v 1.3 2007/02/05 03:23:48 mfredrickson Exp $

I was able to apply the patch successfully to this version, but could not find the version listed in the patch. Where can I get

$Id: viewfield.module,v 1.4 2007/02/18 00:40:26 mfredrickson Exp $

Like I said before, I am not an expert in this area - I am a designer - so I'm fairly certain that the problem is something I'm doing wrong.

Thanks for you help.

plach’s picture

Your version is simply not up to date (1.3), just updating from CVS (cvs -q update -d -P) should do the trick.
If you're not familiar with CVS and patching I strongly recommend you to use the Eclipse IDE in his PDT flavour to checkout projects and applying patches.

Here you can find some good links that explain how to set it up with Drupal:

http://drupal.org/node/37615
http://drupal.org/node/60179
http://drupal.org/node/157609

The last one is specifically about backend development but explains how to configure the Eclipse text editor to work with Drupal-specific file extensions.

dogboy72’s picture

Thank You! I'll let you know how it works.

momper’s picture

subscribe

epikur79’s picture

subscribe

scottrigby’s picture

I look forward to testing this soon – in the meantime, has anyone had initial results so far? I haven't really heard how this is working out for anyone yet... would be good to build on any problems/solutions found, etc. Cheers! Scott

richardhkirkando’s picture

I'm not a developer either, so I have no idea if I'm doing this correctly, but here's what I did:

# cvs checkout contributions/modules/viewfield
# cd contributions/modules/viewfield
# wget http://drupal.org/files/issues/viewfield-26.patch 
# patch < viewfield-26.patch

That should be it, right? Seems to have a problem with viewfield.module:

--------------------------
|Index: viewfield.module
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/viewfield/viewfield.module,v
|retrieving revision 1.4
|diff -u -r1.4 viewfield.module
|--- viewfield.module	18 Feb 2007 00:40:26 -0000	1.4
|+++ viewfield.module	4 Aug 2008 09:56:54 -0000
--------------------------
Patching file viewfield.module using Plan A...
Hunk #1 failed at 1.
Hunk #2 failed at 51.
Hunk #3 failed at 180.
Hunk #4 failed at 203.
4 out of 4 hunks failed--saving rejects to viewfield.module.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------

Any ideas?

epikur79’s picture

For me, the patched version works nicely.

zmove’s picture

Hi, it is possible to see a zip file with the full 6.x version, or the author to create a dev version of 6.x branch ?

I don't have patching programs, and I don't know how to patch with command line (and I'm on windows, not linux).

thanks

richardhkirkando’s picture

Hmm, seems that the patch utility on FreeBSD handles things differently. I tried applying the patch on a linux PC with the same steps as my previous comment, and it worked just fine.

plach’s picture

StatusFileSize
new7.06 KB

@zmove:

I am providing a zipped version, but I will not support any future code change except through patches.
Please note that the Eclipse IDE is freely available for Windows.

zmove’s picture

Thank you very much, I will try that :)

WorldFallz’s picture

Installed the module from #39-- it installed perfectly, and seems to be working fine.

libeco’s picture

Also tried #39 on a local installation of 6.4 and so far it works absolutely flawless. Thanks!

moshe weitzman’s picture

Status: Needs review » Needs work

thanks. did a quick code review.

  • does not look right: + '#columns' => array('vname', 'vargs'), '#delta' => 0,
  • use drupal_load('module', 'content'); like other field modules now do in .install file
moshe weitzman’s picture

Status: Needs work » Fixed

the first point is OK and i fixed #2. committed to HEAD, wihtout testing. lets wait a week for testers and then make a release.

please file new issues as you find them.

wuf31’s picture

@moshe
Where to get HEAD? The one @ the project page and through web CVS browsing is 18 months old..

Testing #39 version for now

darren oh’s picture

HEAD is a development release. Development releases are updated once a day.

moshe weitzman’s picture

I republished the HEAD dev snapshot so it will become refreshed in the next 6 hours.

artis’s picture

HEAD still hasn't changed. It's still really old. I installed #39 and it worked fine except for one thing. I don't know if I should mention it here or open another issue since there isn't a release for D6 yet so here goes...

Viewfield in function viewfield_views_query_alter() adds: 'WHERE node.nid NOT IN'
This statement keeps the view from displaying the containing node within it's results and creating a loop. The problem is that my view is a 'User' view so it doesn't reference the node table in the database. So when I put it in a viewfield I get an SQL error: "Unknown column 'node.nid' in 'where clause' query".

If I comment out line 384 it works perfectly. We need to figure out a way to do this check on views that don't call the node table. I'll see what I can find but if someone knows the answer feel free to solve it.

moshe weitzman’s picture

perhaps try pre_view hook: http://views2.logrus.com/doc/html/group__views__hooks.html#g471b90caa886.... You should be able to know if node table is included and only take action then.

I don't know why the HEAD release is not refreshing. Some packaging problem I guess.

artis’s picture

So I think it has something to do with there not being an ensure_table line before the add_where on line 384

I tried adding:
$query->ensure_table('node');

with no effect.

plach’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

@moshe

I downloaded the 6.x-1.x-dev release, but it seems to contain the 5.x-1.x-dev head version, moreover checking out the head from cvs provides the same "outdated" version: it seems like your commit somehow went wrong.

moshe weitzman’s picture

gosh - i committed to viewfeed project by accident. all fixed now. package will rebuild within 12 hours.

plach’s picture

great!

I have filed a new issue for the #48 (#301503: Viewfield supports only node views)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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