Broken by the new Views

JaceRider - September 11, 2008 - 22:38
Project:Views Datasource
Version:6.x-1.0-alpha2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

I'm not sure what the issue is as I have poured over the code myself and can't find anything. After upgrading to the newest views dev release, the Views Datasource module stops working.

Now, if I go in to edit a view I created previous to the update and using this module, it says "Missing style plugin" in the style area of the view.

If I try to view the result of the view, I get the following error:

Fatal error: Call to a member function uses_fields() on a non-object in /bla/public_html/sites/default/modules/views/includes/view.inc on line 556

A bit of help would be greatly appreciated! Thanks!

#1

zmove - September 14, 2008 - 19:19

Same error here, with the new views RC2.

Any help would be appreciated.

#2

zmove - September 15, 2008 - 15:56
Priority:normal» critical

I think it can be considered as critical.

#3

jkopel - September 16, 2008 - 05:32

I am pretty sure it is the result of this http://www.angrydonuts.com/attention-views-api-developers
I have been trying to figure out how to fix this myself, but I am not having much success.

#4

no2e - September 16, 2008 - 09:14

Is this moulde still under active development? Last release is from July :| Would love to see a new release with this bug fixed.

#5

JaceRider - September 19, 2008 - 15:20

I will say that I was able to get things working. It's a mess of code right now -- but I got it working at least. :) I'll give things a little longer and if no updates are made to this module, I may throw my own version together and get it up for the rest of you guys.

#6

zmove - September 21, 2008 - 07:48

Any news about a possible patch ?

#7

JaceRider - September 22, 2008 - 17:47

Alright guys,

Here is a fixed version I threw together. Obviously I cannot offer any support for this. Also, this is not a patch as the fixes required several filename changes.

I have only tested the XML and JSON modules, but the rest should work as well.

First, uninstall the modules from the Admin Module page, then simply delete your existing views_datasource folder and unzip the attached folder in its place and re-enable the modules of your choice. It is no longer required that all modules be enabled for things to work.

AttachmentSize
views_datasource.zip 27.05 KB

#8

oriol.rico - September 26, 2008 - 11:59

Hello, but i couldn't save the XML option with this datasource. All the other options is ok, but Drupal don't save XML option :P

Could you help me?

Thanks

Oriol

#9

jozzhart - October 2, 2008 - 19:25

It was missing xml_plugin_style.inc, i've included it here...........

AttachmentSize
views_datasource.zip 26.13 KB

#10

guix - December 17, 2008 - 14:40

Check that, the dev is still active and he says there's an alpha 3 coming : http://groups.drupal.org/node/11387
But I checked the HEAD code and it's an older version than alpha 2 :(
Thanks Jozzhart I guess your version is the latest working one :)

#11

drupal.india - January 23, 2009 - 04:56

Hi Dude,

I am using:
(1) views - views 6.x-2.2
(2) views_datasource (provided in the comment-9 by jozzhart on current node,http://drupal.org/node/307223)

I have created a view, and set it to "Style: XML data document". For the same view i have given a path as sitemap.xml, i am able to see the result but it is showing me the message as "This XML file does not appear to have any style information associated with it. The document tree is shown below."

Here is the my created view:

/********************************************/

$view = new view;
$view->name = 'xml_views';
$view->description = 'xml_views';
$view->tag = 'xml_views';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'changed' => array(
'label' => '',
'date_format' => 'medium',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'changed',
'table' => 'node',
'field' => 'changed',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'page' => 'page',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('style_plugin', 'views_xml');
$handler->override_option('style_options', array(
'schema' => 'raw',
));
$handler->override_option('row_plugin', 'unformatted');
$handler->override_option('row_options', array(
'separator' => '|',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'sitemap.xml');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));

/*************************************************************************/

The result i am able to see is in the first-attachment (current.png).
I am looking for the result which is provided in the attached screen-shot (required.png).

Your help would be appreciated.

Thanks,
Drupal Rocking

AttachmentSize
current.png 66.26 KB
required.png 445.37 KB

#12

emackn - June 30, 2009 - 18:14

Still broken?

 
 

Drupal is a registered trademark of Dries Buytaert.