Support from Acquia helps fund testing for Drupal Acquia logo

Comments

steinmb’s picture

Subscribe

BenK’s picture

Subscribing

hampshire’s picture

subscribing

jlporter’s picture

Title: Drupal 7 support? » views_datasource Drupal 7 port

changed title and some other attributes.... oh yeah sub'ing of course. No active maintainer jumping on this one?

vantuykom’s picture

Hi,

are there plans on udgrading to Drupal 7?

regards

Rj-dupe-1’s picture

subscribe

matsjacobsson’s picture

Subscribing :)

David Vespoli’s picture

subscribe

rickmanelius’s picture

subscribe

nicholasspencer’s picture

subscribe

mike503’s picture

subscribe

htumanyan’s picture

I've spent some time over the weekend and seems that got the views_json part of the module ported and working. Other parts shouldn't be very hard to do as the applicable differences between D6 and D7 are not that significant. Unfortunately, I didn't have a chance to - would be happy if anyone takes over from here.

I've also added a new JSON output style tailored for consumption in jqGrid. In order to use it, one needs to select "To be consumed by jqGrid" under JSON data format on style configuration page.

Please, feel free to use the attached patch as you deem appropriate.

Cheers,
Hovhannes Tumanyan

inolen’s picture

Is this to be applied to the beta2 release? I tried beta2 and and the dev branch and keep recieving "patch: **** malformed patch at line 117: preprocess_views_views_json_style_jqgrid(&$vars) {".

Any guesses as to what I may be doing wrong?

htumanyan’s picture

Yes, indeed, the patch is done over the beta2 release. However, I wasn't careful when preparing a patch and it turned to be useless outside of my dev environment. I apologize for that and have an updated patch that should work: I validated it on different machine than the one, used to produce it.
Here is how I succeeded in application of the patch:

>tar -zxf views_datasource-6.x-1.0-beta2.tar.gz
>patch -p0 < /home/winshare/views_datasource_d7_jqgrid.diff

Please, let me know if this works.

inolen’s picture

Well, I tried again patching from modules/views_datasource and got a similar error (patch: **** malformed patch at line 115: preprocess_views_views_json_style_jqgrid(&$vars) {).

I'm using whatever version of patch came with my local Perl install (v 2.5.9 apparently), are there different versions of this patch format? One other thing that unnerves me is that it asks me for the filename on patches that are in between a filename declaration like so:

+++ ./views_datasource_d7/theme/views-views-json-style-simple.tpl.php	2011-02-21 17:01:21.000000000 -0800
@@ -21,6 +21,7 @@ if ($view->override_path) {

It patches 'theme/views-views-json-style-simple.tpl.php' just fine there.

But 5 lines later

@@ -31,7 +32,7 @@ else {
     // We want to send the JSON as a server response so switch the content

And it wants to know what file it's supposed to be patching. Giving it my best guess, I would assume the file it should be patching is the file listed in the previous declaration, but I'm not so sure why it's confused.

inolen’s picture

To follow up, I just installed the latest Cygwin release and ran the patch.exe that came with it (v 2.5.8) and it patched everything with no errors. Thanks for your help and work :)

htumanyan’s picture

I'm glad to hear that it worked - I was planning to reproduce your environment and try to replicate the problem to understand what goes wrong. Looks like the issue was due to the diff...

Thank you,
Hovhannes

ogi’s picture

subscribe

htumanyan’s picture

FileSize
176.42 KB

I've spent some more time and managed to port RDF, XML and XHTML styles to D7. Attached to this message is a diff file that encapsulates prior changes, i.e. JSON and JqGrid output as well as those, to enable RDF/XML/XHTML. Once applied over the beta2 version, the patch enables normal operation of all output styles in Drupal 7.

Please, try it out and report issues back in this thread.

Thank you,
Hovhannes

allisterbeharry’s picture

Thanks hugely htumanyan for making a usable port while I wasn't active. I'm going to devote some time this weekend to testing your patch - if it checks out ok I'll probably mark it as the first D7 alpha release. Meanwhile I'm going to restart work and roll in all the fixes from the D6 issues into the D7 branch.

ogi’s picture

I want Atom feed on my Drupal 7 and tried the patch in #19. I got SQL error for the SQL generated by Views. It's about WHERE (base.uid IN ('ogi')) where base.uid is integer column and 'ogi' is View author in Style options.

htumanyan’s picture

ogi,
Does your view work properly with other view styles, i.e. unfomatted, list etc.? It does not seem very likely for views_datasource to cause SQL errors. In other words, it is not clear that the issue, you reported, is related to the patch. Do you think that it is?

Strae’s picture

Subscribing.
This is a great module, thanks for the porting in d7!

klonos’s picture

Component: Code » Documentation

I tried putting together a proper .tar.gz by applying the patch in #19. I intended to upload it here so that people can have a go with it. Unfortunately, there are too many things wrong with the patch (and the original module to start with):

- A LOT of trailing blanks EVERYWHERE!
- A LOT of tabs instead of spaces EVERYWHERE!
- The patch in #19 includes files (perhaps temp) created during development stage. These are same as original/patched files, but with a "~" added at the end of their filename. There is absolutely no need for them to be in a proper patch in order to review.

...btw, Allister says we should have new D6 & D7 versions by today ;) ...here: #1074430: New version will be released soon - no really

So, I guess we should give him some time and then apply whatever was not thought off/included from these patches here.

klonos’s picture

@Hovhannes: Allister mentions in #1074430: New version will be released soon - no really that he might consider a co-maintainer. Are you up to it? ...I mean since you have put so much time and effort here and all.

htumanyan’s picture

@klonos - please see attached the new version of the patch that is free of *~ files and other leftovers of dev work. The attached contains the same set of changes as in the #19, but is also free of useless temporary files and other dev artifacts.

Regarding co-maintainership, I should say that it is Allister's call. I don't mind spending some time and supporting the maintenance/enhancement effort on on-going bases, but defer to Allister to decide whether the help is necessary or not.

klonos’s picture

Status: Active » Needs review

Thanx for the updated patch Hovhannes. We're at my wife's village at the moment (this Monday is a holiday in Greece) and I have limited access to my testing servers/environment. I will give it a try within the week (hopefully - if real life doesn't catch up) or next weekend worst case scenario and let you all know how it goes.

I know that it is up to Alister to ask for a co-maintainer (he said he'll file an issue for that if/when ever), I simply wanted to know ahead if you are interested to take the job if you were asked ;)

wpanssi’s picture

I applied patch in #19 against views_datasource-6.x-1.0-beta2:
patch < ../views_datasource_d7_full.diff

But I get a lot of errors:
patching file README.txt
patching file views-views-json-style-jqgrid.tpl.php
patching file views-views-json-style-simple.tpl.php
Hunk #1 FAILED at 21.
Hunk #2 FAILED at 31.
2 out of 2 hunks FAILED -- saving rejects to file views-views-json-style-simple.tpl.php.rej
patching file views_views_json_style.theme.inc
Hunk #1 FAILED at 14.
Hunk #2 FAILED at 27.
Hunk #3 FAILED at 38.
Hunk #4 FAILED at 53.
Hunk #5 FAILED at 101.
5 out of 5 hunks FAILED -- saving rejects to file views_views_json_style.theme.inc.rej
patching file views-views-rdf-style-doap.tpl.php
Hunk #1 FAILED at 61.
1 out of 1 hunk FAILED -- saving rejects to file views-views-rdf-style-doap.tpl.php.rej
...
Same thing with the patch in #26.

Strae’s picture

subscribing

ryne.andal’s picture

subscribing

rancas’s picture

subscribing

romaingar’s picture

subscribe

davidwhthomas’s picture

In the meantime, some subscribers may be interested in http://drupal.org/project/views_data_export

klonos’s picture

Title: views_datasource Drupal 7 port » views_datasource module Drupal 7 port
Issue tags: +D7 porting, +port to d7, +d7 ports
RavenHursT’s picture

The if($view->override_path) was throwing notices in D7 so I've patched them with
if(property_exists($view, 'override_path') && $view->override_path)

PS: This patch was made AFTER applying the patch in #26 to the 6.x-1.0-beta2 release.

New Patch:

perandre’s picture

subetiy-sub.

qbnflaco’s picture

subscribing

valderama’s picture

sub

zkrebs’s picture

dom

jeffschuler’s picture

Thanks @htumanyan!

I've updated the patch in #26 in two simple ways:
1. Patch from within the views_datasource directory -- instead of a directory above and without messing with the name of the directory.
2. Removed all of the files ending in ~.

I'm about to try it out.

Shouldn't we be patching against 6.x-1.x-dev?

@RavenHursT this doesn't include your patch in #35. I'd recommend rerolling the entire patch so folks don't have to apply two.

jeffschuler’s picture

Attaching the patch always helps.

htumanyan’s picture

Thanks for cleaning the patch!! It would be nice to see it applied to the trunk, but it would seem that Allister is busy/unavailable

berenddeboer’s picture

Status: Needs review » Reviewed & tested by the community

#41 applies cleanly and works perfectly.

rickmanelius’s picture

Patch #41 worked for me as well.

klonos’s picture

Component: Documentation » Code
Priority: Major » Normal

I think it's time for a 7.x dev branch here ;)

PS: anybody confirming that #35 is still an issue?

PPS: I just noticed that this issue was under the 'documentation' component. Looking back at #24 I realized it was me who set it to such. That was totally by mistake/slip of the finger. Back to 'code' where it actually belongs + feature requests are *never* marked as 'major' or 'critical' (no matter how bad we may want them).

kirkilj’s picture

subscribe

berenddeboer’s picture

Here a slight extended patch that gives some ability to define your own JSON output formats.

upupax’s picture

subscribe.

RavenHursT’s picture

Omgosh.. can we pleeeease just cut a 7.x-dev branch for this? Seriously....

jeffschuler’s picture

maybe @htumanyan could set this up in a git sandbox for now until @allisterbeharry has a chance to review it?

Haehnchen’s picture

i created a sandbox project for 7.x @ http://drupal.org/sandbox/Haehnchen/1163470

views_datasource_custom_json_output.patch is in and a small patch to get a flat json array list instead of nested arrays.

berenddeboer’s picture

I noticed one bug: multiple value output has not been rewritten properly yet.

MacRonin’s picture

Subscribe

Adam S’s picture

subscribing

eiriksm’s picture

subscribing... and testing the content of the sandbox project. seems to work great for what i need at first sight!

berenddeboer’s picture

Another bug: if you're using a language different than in English, the labels get translated...

That's exactly not what you want in this case. No clue how to fix it, it appears the label translation happens deep inside views' bowels.

Mescalito2’s picture

Hello! how can I use the ".patch" file, I am kind of new in Drupal, help please!

Thanks!

MacRonin’s picture

Taxoman’s picture

Subscribing

illmatix’s picture

subbed.

rickmanelius’s picture

Any additional items needed for a D7 release? Or does the patch need further work/review?

Neue Werte’s picture

subscribe

kirkilj’s picture

subscribe

berenddeboer’s picture

Hmm, people looking at #51 will notice this is completely empty.

MPeli’s picture

Would it be possible to create a dev version? Thanks

SebCorbin’s picture

Subscribe

Pasqualle’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Needs review

EDIT: download link removed
download: ...

based on sandbox from comment #51
fixed code style, and code duplication of plugin files..
tested the xml and json style, it seems to work..

tripper54’s picture

Category: feature » task
Status: Reviewed & tested by the community » Needs review

subscribe

mraichelson’s picture

subscribe

Cyberwolf’s picture

Subscribing.

narnua’s picture

subscribing

marcjohnson’s picture

Thanks for this code update, Pasqualle!

Tested xml style.

It works, but immediately after displaying the view, if I navigate to another page on the drupal site, I see the transient error "Notice: Undefined variable: content_type"

The full error is:
Notice: Undefined variable: content_type in include() (line 21 of /xxx/xxx/public_html/subdomains/apeman/deercamp/sites/all/modules/views_datasource/theme/views-views-xml-style-raw.tpl.php).

Pasqualle’s picture

new dev-pasq release available from my web site (see link in comment #67).
- fixed content_type notice
- fixed row_index notice
- directory structure changed
- code style changes
- hook views_x_formats() for all sub-modules

rickmanelius’s picture

Hi Pasqualle. Any word on whether this will be the new official release for the 7.x branch? I'm hesitant to fully commit to using your version (even though you've probably done a super job) if it's not going to be a supported version or the official version is going to be very different and break any code you've written.

This is such an important module. It would be helpful to know if it will be supported, transitioned, or officially abandoned... so we can have some closure and plan accordingly :)

rv0’s picture

subscribing + about to test

marcjohnson’s picture

Re: making it official. We have a production site running off of Pasqualle's excellent port. What is the process for making it an official release?

annikaC’s picture

Pasqualle, thanks for this great port. Everything was working great up until this morning, when the module suddenly stopped working and showed up as a missing style plugin (I had Views XML enabled). Had to disable and enable to get working again. Not sure what the trigger was, but wondered if anyone else had encountered the problem.

Pasqualle’s picture

to make it an official release: #1240422: Offering to maintain views_datasource

klonos’s picture

Amen!!!

paulatstepup’s picture

subscribed and installed for testing

dreadlocks1221’s picture

subscribed

mirzu’s picture

We are working with this port and have had no problems after about a day of testing. Look forward to the official release.

Pasqualle’s picture

Status: Needs review » Fixed

Thanks everyone!
The D7 port is now available from the project page on d.o. I hope I named everyone in the commit message who participated in this issue. I am sorry if I missed someone.

If somebody would like to help maintain the module then please
- help with cleaning up the issue queue. if you can answer a support question, then please just do it
- post any problems with the module
- post patches, solutions or code snippets
- create documentation pages
I will give you permissions if you ask for it and when I see you are really helping with the module..

thanks again

klonos’s picture

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

Thanx Bálint. I will try to help with the issue queue triaging as much as I can.

klonos’s picture

...btw, do you want me to switch all feature requests to the 7.x branch where they actually belong or...??

Taxoman’s picture

If this is fixed for D6, and it subsequently is moved to the D7 branch, then its status should be changed from Fixed to Active too, I guess?

klonos’s picture

Errr... this is about the port to d7. There's nothing to be fixed in the 6.x branch. Switching to the 7.x branch once a port is done is more of a habit or a thing we simply do in order to signify that there actually is a 7.x branch available. There's nothing else to it.

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Closed (fixed)
Issue tags: -D7 porting, -port to d7, -d7 ports

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