Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!
Comment | File | Size | Author |
---|---|---|---|
#11 | current.png | 66.26 KB | Ujval Shah |
#11 | required.png | 445.37 KB | Ujval Shah |
#9 | views_datasource.zip | 26.13 KB | jozzhart |
#7 | views_datasource.zip | 27.05 KB | JaceRider |
Comments
Comment #1
zmove CreditAttribution: zmove commentedSame error here, with the new views RC2.
Any help would be appreciated.
Comment #2
zmove CreditAttribution: zmove commentedI think it can be considered as critical.
Comment #3
jkopel CreditAttribution: jkopel commentedI 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.
Comment #4
no2e CreditAttribution: no2e commentedIs this moulde still under active development? Last release is from July :| Would love to see a new release with this bug fixed.
Comment #5
JaceRider CreditAttribution: JaceRider commentedI 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.
Comment #6
zmove CreditAttribution: zmove commentedAny news about a possible patch ?
Comment #7
JaceRider CreditAttribution: JaceRider commentedAlright 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.
Comment #8
oriol.rico CreditAttribution: oriol.rico commentedHello, 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
Comment #9
jozzhart CreditAttribution: jozzhart commentedIt was missing xml_plugin_style.inc, i've included it here...........
Comment #10
GuillaumeDuveauCheck 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 :)
Comment #11
Ujval Shah CreditAttribution: Ujval Shah commentedHi 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
Comment #12
emackn CreditAttribution: emackn commentedStill broken?
Comment #13
aaron CreditAttribution: aaron commented#9 works fine for me. can someone commit it?
Comment #14
aaron CreditAttribution: aaron commentedthe patch at #432452: Is Views_datasource still being maintained? Yes #1 corresponds to #9.
Comment #15
kyle_mathews CreditAttribution: kyle_mathews commentedJust tried installing #9 and it's broken (again). The error I'm given is "The row plugin is not of type Unformatted."
I'm running 6.x-2.6.
Comment #16
gausarts CreditAttribution: gausarts commentedsubscribing for updates. Thanks
Comment #17
hchall CreditAttribution: hchall commentedAlso eager to see this module work with Views 2.
(Drupal 6.13, Views 6.x-2.6, Views Datasource 6.x-1.0-alpha2)
Thanks for the effort!
Comment #18
allisterbeharry CreditAttribution: allisterbeharry commentedFixed in alpha3: http://drupal.org/node/598242
Comment #19
allisterbeharry CreditAttribution: allisterbeharry commented