I recently updated from 6.4 to 6.6, and since then my two page displays have become screwed up and I can't figure out how to fix them. The site is a three column site, and the right sidebar gets put in strange places (either below the page content, as in the attached screenshots, or alongside it but too far down and waaaay too wide).
The content/wrapper background, which is just a solid color, also cuts out in the middle. It cuts out exactly at the lowest viewable place in the browser. When you scroll down the page, at that point the wrapper background isn't there and the whole row has just the page background. Attached are screen shots.
Here is the code for one of the views, News.
$view = new view;
$view->name = 'News';
$view->description = '';
$view->tag = '';
$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', 'UpcomingWorkshops', 'default');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 1,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'created' => array(
'label' => '',
'date_format' => 'custom',
'custom_date_format' => 'l, M d',
'exclude' => 0,
'id' => 'created',
'table' => 'node',
'field' => 'created',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'created' => array(
'order' => 'ASC',
'granularity' => 'minute',
'id' => 'created',
'table' => 'node',
'field' => 'created',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'title' => array(
'id' => 'title',
'table' => 'node',
'field' => 'title',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'story' => 'story',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'promote' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'promote',
'table' => 'node',
'field' => 'promote',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('title', 'Latest News');
$handler->override_option('items_per_page', 2);
$handler->override_option('use_more', 1);
$handler->override_option('style_options', array(
'grouping' => 'title',
));
$handler->override_option('row_options', array(
'inline' => array(),
'separator' => '',
));
$handler = $view->new_display('page', 'Latest News', 'page_1');
$handler->override_option('items_per_page', 0);
$handler->override_option('row_plugin', 'node');
$handler->override_option('row_options', array(
'teaser' => 0,
'links' => 1,
'comments' => 0,
));
$handler->override_option('path', 'news');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'Latest News',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 1,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'created' => array(
'label' => '',
'date_format' => 'custom',
'custom_date_format' => 'l F d',
'exclude' => 0,
'id' => 'created',
'table' => 'node',
'field' => 'created',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Firebug-clue.png | 50.57 KB | jugney |
| Screenshot-5.png | 90.71 KB | jugney | |
| Screenshot-4.png | 188.63 KB | jugney | |
| Screenshot-3.png | 45.66 KB | jugney | |
| Screenshot-2.png | 54.77 KB | jugney |
Comments
Comment #1
jugney commentedUPDATE: Thanks to the Firebug plugin and some code inspecting, I saw that the right sidebar element is being placed outside the wrapper element, for some unknown reason.
So the question is now just, how do I edit the code of a view? I haven't been able to find where to edit this code anywhere.
See attached for the firebug display.
Comment #2
merlinofchaos commentedThat looks more like a problem with your theme than Views. My best guess would be that there's an extra closing div somewhere that shouldn't be there.
Try switching to Garland. IF that problem doesn't exist in Garland then you know the problem is theme related.
Comment #3
jugney commentedI don't see the issue in Garland, but that's because Garland doesn't show a right sidebar.
It's a curious problem. Other pages on the site - that are real nodes and not page display views - display fine and that div section is right where it should be. But looking in the code generated for the Views page display nodes, it is misplaced. So that's why I'm still wondering about the Views influence.
Comment #4
merlinofchaos commentedI always put blocks on the right in Garland.
I can't really think of anything in Views that would cause this. I feel fairly confident it isn't Views that's doing this, though I don't know what might actually be doing it. Maybe you have a views template in your theme that is wrong.
Comment #5
jaks1970 commentedI had a similar problem when I missed closing a div inside a custom block I created. Just though I'd throw that out there.
Good luck
Jaks
Comment #6
jugney commentedIs there a way to edit the code of a Views page display? If so, this would be a super easy fix...but I assumed this wasn't possible.
Comment #7
merlinofchaos commentedIt all goes through various templates. See the advanced help which contains an explanation for what pieces make up a display.
Comment #8
jugney commentedThank you for your help so far. I cannot find where to access Advanced Help in the Views module...?
Comment #9
merlinofchaos commentedWhen you installed Views there should have been a big annoying message telling you to install advanced help (and giving you an option of turning off that message). If you did install advanced help, just go to the advanced help index (admin/advanced_help) or on the views list there's a getting started link at the top. If you *didn't* install advanced help, you really should do that.
Comment #10
merlinofchaos commentedOver a year with no activity. Closing.