Rotor Style not displaying items after update to Views 6.x-2.7

GatorBat - November 3, 2009 - 15:11
Project:Rotor Banner
Version:6.x-2.2
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:fixed
Description

I've been successfully using this module on a live site and a couple of testing beds for months now, and have been able to update the Views module each time without any display issues. This time around, the most recently released Views module (6.x-2.7) has a warning posted in it's release notes about external styles:

Note: Views 2.7 contains some rearrangement of the order of field rendering. While I didn't see any errors or hear of any errors due to this, it may affect some external style plugins. If you have a problem with how fields render and are using a non Views-core style, please doublecheck with the 'table' or 'unformatted' styles and see if the problem persists. If it does not, it may well be the style provided by a module.

Sure enough, while no "error" is printed to the screen, the small sets of images of a custom CCK type that uses ROTOR as it style of choice now longer display the images and rotate through them, even in the View preview. No other changes have been made, and I am NOT using the built-in Rotor Content type that this module includes, as I needed a bit more flexibility, hence the custom CCK type which stores and image, a quick blurb, and a url link (if needed).

Is anyone else experiencing this? I imagine there's just a small code adjustment that will enable to Rotor style plugin for view to function flawlessly like it has been. Please let me know if you need more information, and I'll do my best to provide it.

Here's a copy of the exported view for a small block that rotates through a small selection of items that has worked for 3-4 months until the Views 6.x-2.7 release:

$handler = $view->new_display('block', 'MiniSpot: Hotel Highlights', 'block_5');
$handler->override_option('fields', array(
  'field_minispot_image_fid' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'image_plain',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_minispot_image_fid',
    'table' => 'node_data_field_minispot_image',
    'field' => 'field_minispot_image_fid',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'field_minispot_reference_url' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_minispot_reference_url',
    'table' => 'node_data_field_minispot_reference',
    'field' => 'field_minispot_reference_url',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'random' => array(
    'order' => 'ASC',
    'id' => 'random',
    'table' => 'views',
    'field' => 'random',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'minispot' => 'minispot',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'tid' => array(
    'operator' => 'or',
    'value' => array(
      '10' => '10',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'type' => 'select',
    'limit' => TRUE,
    'vid' => '3',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 1,
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('style_plugin', 'rotor');
$handler->override_option('style_options', array(
  'grouping' => '',
  'width' => '200',
  'height' => '200',
  'seconds' => '5',
  'speed' => '1',
  'effect' => 'fade',
  'pause' => 0,
  'tabs' => array(
    'show_tabs' => 0,
    'group_tabs' => '',
    'position' => '0',
  ),
));
$handler->override_option('block_description', 'MiniSpot: Hotel Highlights');
$handler->override_option('block_caching', -1);

#1

GatorBat - November 4, 2009 - 16:53

I still able to use a different module for the Views Style (Views Rotator) to achieve a similar effect, but I would prefer to use Rotor Banner as it provides more options for transitions and such, and at least at the moment, receives more maintenance and attention that Views Rotator does.

I've tried building fresh/clean views, and was certain to clear both the Views Cache and Site Cache (admin/settings/performance), and still no avail. Certainly I'm not the only one using Rotor Banner to display simple little spotlights of images (and possible a quick line of text) to achieve this nifty little feature.

#2

mrfelton - November 4, 2009 - 17:09

I just upgraded my sandbox to the latest version of Views and it works fine with the latest Rotor code in svn. Please can you update to the latest -dev version and see if the problem persists. If it does, then please try disabling any other modules that you may have enabled.

#3

GatorBat - November 4, 2009 - 21:29

Shall do Mr. Felton, I'll report back once I've been able to test out the latest -dev revision, currently listed as 2009-Oct-06.

#4

GatorBat - November 5, 2009 - 17:07

Just noticed that a new -DEV version (2009-Nov-05) was released this morning, with release notes mentioning:

New branch for new development work.
Moving away from the current content-type approach and rewriting as a views display plugin to allow for greater flexibility.

I was just about to use the previous dev version when I saw the updated SVN/Dev. Should I use this NEW -dev version, or the one I previously downloaded dated 2009-Oct-06 as I mentioned in #3.

#5

mrfelton - November 5, 2009 - 17:09

I'm not sure why the -dev has that description. This morning I fixed a number of other bugs, unrelated to this one. I would advise getting the very latest -dev and giving that a go.

#6

GatorBat - November 5, 2009 - 22:30

Sadly the same issue persists. I can use ANY other style for my Views, and the Live Preview and actual Page results display just fine. Here's the Live Preview query for when I tried using ROTOR as the style:

SELECT node.nid AS nid,
   node_data_field_minispot_image.field_minispot_image_fid AS node_data_field_minispot_image_field_minispot_image_fid,
   node_data_field_minispot_image.field_minispot_image_list AS node_data_field_minispot_image_field_minispot_image_list,
   node_data_field_minispot_image.field_minispot_image_data AS node_data_field_minispot_image_field_minispot_image_data,
   node.type AS node_type,
   node.vid AS node_vid,
   node_data_field_minispot_image.field_minispot_reference_url AS node_data_field_minispot_image_field_minispot_reference_url,
   node_data_field_minispot_image.field_minispot_reference_title AS node_data_field_minispot_image_field_minispot_reference_title,
   node_data_field_minispot_image.field_minispot_reference_attributes AS node_data_field_minispot_image_field_minispot_reference_attributes,
   RAND() AS _random
FROM node node
INNER JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN content_type_minispot node_data_field_minispot_image ON node.vid = node_data_field_minispot_image.vid
WHERE (node.type in ('minispot')) AND (term_node.tid = 10)
   ORDER BY _random ASC

I even tried using the exact dimensions of the image it should be loading (though I've never had to before now), but to no avail. I imagine the changes in the newest views is causing the bug somewhere.

#7

mrfelton - November 6, 2009 - 08:48

Can you give me a link to where I can see the Rotor banner on the page to investigate?

#8

GatorBat - November 6, 2009 - 12:56

Here's a link to the Live Site with the right corner block that's blue should be rotating through images of the hotel: http://www.skillslabsymposium.com/Hotel

I've switched back to using the Views Rotator style for the other areas that rotate through images until we're able to find a solution for this puzzle. All other blocks that rotate through various images on the site were using Rotor banner successfully until now. Thanks for your continued assistance, it is much appreciated.

#9

mrfelton - November 6, 2009 - 13:12

Looks like you have the same error as mentioned here: http://drupal.org/node/513948#comment-1802136. Not sure what this is yet, but I'm looking into it. Could you provide an export of your view please?

EDIT: ignore - I forgot you already provided this.

#10

mrfelton - November 6, 2009 - 13:08

Is your Rotor inside a Panel built with the Panels module?

#11

GatorBat - November 6, 2009 - 13:22

The Rotor is inside a gPanel (a light weight function provided as part of the Genesis theme, the theme you see is a sub-theme of Genesis created following their guidelines). This has worked for 3-4+ months without an issue though. The Views Live Preview doesn't show an image either, even when I build a new view not tied to anything else in terms of theming, it pulls up a blank area roughly the height of the expected image, but displays nothing.

#12

mrfelton - November 6, 2009 - 13:23

I managed to replicate the problem now... am working on a fix.

#13

mrfelton - November 6, 2009 - 13:37

Please could you check out the latest code from CVS and try that - instructions for CVS at http://drupal.org/node/241442/cvs-instructions/DRUPAL-6--2.

#14

GatorBat - November 6, 2009 - 13:44

Give me a little bit to get the CVS software installed, and I'll report back once I've snagged the latest version from the CVS - I appreciate the instructions, should make it easier for me (first time doing it this way).

#15

mrfelton - November 6, 2009 - 13:45

No problem. Alternatively, you can wait a whiler and a new -dev tarball will be released. They get automatically packaged every 12 hours,

#16

GatorBat - November 6, 2009 - 14:43

It's probably just me being new to the whole CVS thing, but when I use Tortoise and login with anonymous:anonymous and browse to the /contributions/modules/rotor folder, all the files listed there have an April 2008 modification date. I'm following the instructions here: http://drupal.org/node/22293 - Any idea what I might be doing wrong?

Nevermind, I found where to select the branch instead of using the defaulted option for HEAD. I have the copy now, and will report back soon!

#17

mrfelton - November 6, 2009 - 14:43

MAke sure you are looking at the correct branch. New development is done on the DRUPAL-6--2 tree.

#18

GatorBat - November 6, 2009 - 15:28

The code from the latest CVS #13 does indeed work. Thank you so very much for your quick attention and fix on this module.

I only have one other question. With previous versions of this module, the width and height fields that are part of the "gear" selection of the View Style were defaulted to 200px, and had NO IMPACT on the display of my images/content with a Rotor (they would fill up the areas allotted by the block). I had to manually add in the correct dimensions on most of the items so they would display correctly. Was there a change in this newest CVS version, or is there a value I should input into those fields so it will just fill the area the block has?

#19

mrfelton - November 6, 2009 - 16:13
Status:active» fixed

Excellent!

Regarding the other issue... there is no magic value to tell it to fill the entire block, though that is a good idea. Perhaps you could create a new ticket for that as a feature request? I like to keep 1 ticket for 1 issue.

#20

GatorBat - November 6, 2009 - 16:19
Status:fixed» active

No problem about creating a new ticket, I know this queue would get cluttered fast otherwise. I was just curious as to why it ignored the values for height and width before on the other releases, and now it requires them. Not a big deal if there isn't an easy answer, I just wanted to know if this was working as intended, and I'd somehow escaped it before now, or if it was a change in the updated fix you were kind enough to provide.

We can mark this issue fixed though, and I'll open up a ticket about filling an entire block :)

Thanks again for your help!

#21

mrfelton - November 6, 2009 - 18:00

To be perfectly honest, I have no idea why the width/height were being ignored for you in the past. They always worked for me, and nobody else reported the problem. Thinking about the code, I can't even see how it is possible, as setting those values cause inline css to be included in the outputted html. Please do open another ticket though and I will be happy to work through it with you.

#22

mrfelton - November 12, 2009 - 18:20
Status:active» fixed
 
 

Drupal is a registered trademark of Dries Buytaert.