Closed (works as designed)
Project:
Panels
Version:
7.x-3.3
Component:
Panel nodes
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2012 at 19:59 UTC
Updated:
10 Apr 2013 at 15:01 UTC
I have a taxonomy variant to replace the display on the taxonomy page.
There is an extra path being inserted into the url for images and css.
It should be sites/all/themes/fence/images....
It is now class-types/sites/all/themes/fence/images....
This is breaking the layout and all theme elements.
The theme and layout works if accessed through my servers temp urls e.g. xx.xxx.xx.xx/~username/
If access through the domain name it breaks.
I'm using Hostgator
Comments
Comment #1
merlinofchaos commentedThere's no real way to debug this with the amount of information given. At a guess, perhaps you're running into a problem with relative URLs, or maybe you're running into a problem with Drupal beliving the domain is incorrect.
Panels doesn't normally render the URLs for images and CSS, however, so that's something underneath Panels and I have no idea what that is.
Comment #2
esmerel commentedComment #3
nicxvan commentedIt could be an interaction with pathauto. When visiting the url the extra url piece is added to everything on the page. I have not edited the base url, but even images have it inserted if they are relative links.
It only occurs on pages using panels.
Comment #4
merlinofchaos commentedYou need to give precise instructions on how something is set up. As I tried to say in an earlier post, there just isn't enough information to be helpful. Re-activating the issue without providing enough information doesn't help anybody.
Comment #5
nicxvan commentedI apologize: I will try to provide more information again.
I have a block with an image that is linked relatively: e.g. sites/default/files/example.png
On the home page or a page that does not use views or panels the image displays in the block.
On panel pages I get the alt text and if I look at the source the image does not display. Sometimes the relative path is changed to have content/sites/default/files/example.png
I have the panel export pasted below, if you need more information please give me an idea where I can look to get more relevant information for you. I see this on two sites.
$handler = new stdClass();
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'node_view_panel_context_2';
$handler->task = 'node_view';
$handler->subtask = '';
$handler->handler = 'panel_context';
$handler->weight = 1;
$handler->conf = array(
'title' => 'Article',
'no_blocks' => 0,
'pipeline' => 'ipe',
'css_id' => '',
'css' => '',
'contexts' => array(),
'relationships' => array(),
'access' => array(
'plugins' => array(
0 => array(
'name' => 'node_type',
'settings' => array(
'type' => array(
'article' => 'article',
),
),
'context' => 'argument_entity_id:node_1',
'not' => FALSE,
),
),
'logic' => 'and',
),
);
$display = new panels_display();
$display->layout = 'flexible:editor_s_corner';
$display->layout_settings = array();
$display->panel_settings = array(
'style_settings' => array(
'default' => NULL,
'title_byline' => NULL,
'picture' => NULL,
'name' => NULL,
'comments' => NULL,
'images_' => NULL,
),
);
$display->cache = array();
$display->title = '';
$display->content = array();
$display->panels = array();
$pane = new stdClass();
$pane->pid = 'new-1';
$pane->panel = 'comments';
$pane->type = 'node_comment_form';
$pane->subtype = 'node_comment_form';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'anon_links' => 1,
'context' => 'argument_entity_id:node_1',
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = '';
$display->content['new-1'] = $pane;
$display->panels['comments'][0] = 'new-1';
$pane = new stdClass();
$pane->pid = 'new-2';
$pane->panel = 'comments';
$pane->type = 'node_comments';
$pane->subtype = 'node_comments';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'mode' => '1',
'comments_per_page' => '50',
'context' => 'argument_entity_id:node_1',
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = '';
$display->content['new-2'] = $pane;
$display->panels['comments'][1] = 'new-2';
$pane = new stdClass();
$pane->pid = 'new-3';
$pane->panel = 'images_';
$pane->type = 'entity_field';
$pane->subtype = 'node:field_story_images_article';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'label' => 'hidden',
'formatter' => 'galleryformatter_default',
'formatter_settings' => array(
'slide_style' => 'galleryformatter_slide',
'thumb_style' => 'galleryformatter_thumb',
'style' => 'Greenarrows',
'link_to_full' => 1,
'link_to_full_style' => '0',
'modal' => 'colorbox',
'slide_width' => '350',
'slide_height' => '315',
),
'context' => 'argument_entity_id:node_1',
'override_title' => 1,
'override_title_text' => 'Story Gallery',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = '';
$display->content['new-3'] = $pane;
$display->panels['images_'][0] = 'new-3';
$pane = new stdClass();
$pane->pid = 'new-4';
$pane->panel = 'images_';
$pane->type = 'entity_field';
$pane->subtype = 'node:field_article_body';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'label' => 'hidden',
'formatter' => 'text_default',
'formatter_settings' => array(),
'context' => 'argument_entity_id:node_1',
'override_title' => 1,
'override_title_text' => 'Article',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = '';
$display->content['new-4'] = $pane;
$display->panels['images_'][1] = 'new-4';
$pane = new stdClass();
$pane->pid = 'new-5';
$pane->panel = 'picture';
$pane->type = 'entity_field';
$pane->subtype = 'node:field_author';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'label' => 'hidden',
'formatter' => 'text_default',
'formatter_settings' => array(),
'context' => 'argument_entity_id:node_1',
'override_title' => 1,
'override_title_text' => 'Author',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = '';
$display->content['new-5'] = $pane;
$display->panels['picture'][0] = 'new-5';
$pane = new stdClass();
$pane->pid = 'new-6';
$pane->panel = 'title_byline';
$pane->type = 'node_title';
$pane->subtype = 'node_title';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'link' => 0,
'context' => 'argument_entity_id:node_1',
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = '';
$display->content['new-6'] = $pane;
$display->panels['title_byline'][0] = 'new-6';
$pane = new stdClass();
$pane->pid = 'new-7';
$pane->panel = 'title_byline';
$pane->type = 'entity_field';
$pane->subtype = 'node:field_subtitle';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'label' => 'hidden',
'formatter' => 'text_default',
'formatter_settings' => array(),
'context' => 'argument_entity_id:node_1',
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = '';
$display->content['new-7'] = $pane;
$display->panels['title_byline'][1] = 'new-7';
$display->hide_title = PANELS_TITLE_NONE;
$display->title_pane = 'new-6';
$handler->conf['display'] = $display;
Comment #6
merlinofchaos commentedThey key here is "linked relatively".
Let's say you're at the URL "http://example.com/content/some-thing".
If I now have a relative link, such as
"<img src="sites/default/files/myfile.jpg" />then the standard behavior of HTML is to treat that link relative to the directory you're in. The directory you're in, according to the URL is "http://example.com/content" and thus the full URL is derived to be: "http://example.com/content/sites/default/files/myfile.jpg".This has nothing to do with Panels, that's pure HTML. And this is why I was never able to answer your question.
In your export, there is nothing that is rendering a link like that, so I assume something deeper, such as a formatter on one of your items, is rendering it, or maybe it's in the node body. Panels isn't doing anything at all to links that are inside fields on your node. Drupal renders that through its own mechanisms, and Panels wraps that up into its layout.
You will probably need to change your URL to this format:
<img src="/sites/default/files/myfile.jpg" />That will eliminate whatever relative part of the URL that HTML derives.
Comment #7
nicxvan commentedThank you, I was confused because it only seemed to happen on views or panel pages.
Your explanation helps a lot though.