I have a simple page I am trying to create that uses userprofile on the top (from advanced profile) has the users blogpost (also from advanced profile) and has a few other views that dont need the view argument.

The page displays fine in the preview page when I enter the argument (userid #) but does not display when the userprofile or anything that uses the arguement when I use the URL and the argument.

The page should be visable at http://www.madebysurvivors.com/ambassador/1 ( may look strange as I am still testing but if does not show any user profile then the argument is not working)

Comments

merlinofchaos’s picture

Can you please export the page and paste the code? It's hard for me to guess what behavior should be when I don't have any sense of how you configured it.

johnTEN’s picture

Thanks for responding so fast!

$page = new stdClass;
$page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
$page->api_version = 1;
$page->name = 'Ambassador_Personal_Pages';
$page->task = 'page';
$page->admin_title = 'a';
$page->admin_description = '';
$page->path = 'ambassador/%';
$page->access = array(
'plugins' => array(),
'logic' => 'and',
);
$page->menu = array();
$page->arguments = array(
'0' => array(
'id' => 1,
'identifier' => 'User ID',
'name' => 'uid',
'settings' => array(),
),
);
$page->conf = array();
$page->default_handlers = array();
$handler = new stdClass;
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'page_Ambassador_Personal_Pages_panel_context';
$handler->task = 'page';
$handler->subtask = 'Ambassador_Personal_Pages';
$handler->handler = 'panel_context';
$handler->weight = 0;
$handler->conf = array(
'title' => 'Panel',
'no_blocks' => FALSE,
'css_id' => '',
'css' => '',
'contexts' => array(),
'relationships' => array(),
'access' => array(
'plugins' => array(),
'logic' => 'or',
),
);
$display = new panels_display;
$display->layout = 'twocol_stacked';
$display->layout_settings = array();
$display->panel_settings = array();
$display->cache = array();
$display->title = '';
$display->hide_title = FALSE;
$display->content = array();
$display->panels = array();
$pane = new stdClass;
$pane->pid = 'new-1';
$pane->panel = 'top';
$pane->type = 'user_profile';
$pane->subtype = 'user_profile';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'context' => 'argument_uid_1',
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$display->content['new-1'] = $pane;
$display->panels['top'][0] = 'new-1';
$pane = new stdClass;
$pane->pid = 'new-2';
$pane->panel = 'right';
$pane->type = 'block';
$pane->subtype = 'aggregator-feed-1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array(
'style' => 'rounded_corners',
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$display->content['new-2'] = $pane;
$display->panels['right'][0] = 'new-2';
$handler->conf['display'] = $display;
$page->default_handlers[$handler->name] = $handler;

johnTEN’s picture

So I guess there is not some easy obvious mistake I am making here?

merlinofchaos’s picture

Sorry, shortly after I posted that I left for DrupalCon in Paris and have been away from the queue for a couple of weeks. Taking a look now.

merlinofchaos’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 6.x-3.0 » 6.x-1.x-dev
Component: Panel pages » Code
Status: Active » Fixed

For no apparent reason, the user profile content required administer users. Strange. I changed this to access user profiles, which is more appropriate. This bug was in CTools, not Panels.

merlinofchaos’s picture

Status: Fixed » Active

Ok, I had that logic wrong. Commit reverted. In this case, I've no idea what's wrong here.

johnTEN’s picture

Can you think of another way to use these or other tools to create the same result but that bypasses whatever is wrong here? Thanks for the help.

merlinofchaos’s picture

Ok, I figured this out.

Your problem is the path. You used
ambassador/%

The problem is, the placeholders need to be named to have contexts assigned to them. What you really want is:

ambassador/%user

And then reassign the user ID context to it.

Page Manager should actually prevent you from doing this, so I'm going to have to figure out why it's not.

merlinofchaos’s picture

Status: Active » Fixed

Added some extra validation so this shouldn't happen in the future.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.