How to override 404 error pages using panel pages? (I need to specify an url in the page setup form.)

Thanks in advance.

Comments

merlinofchaos’s picture

Status: Active » Fixed

You have to give the page a path -- what path you give doesn't really matter, exactly, but pick something you won't want to use as a real path on the site (I just use /404 for my own sites) -- and then enter the URL you used into the system configuration form for the path for the 404 page.

Drupal doesn't have a simple 'plug this into the 404' handler. It just takes whatever URL you give it and uses that output for 404 (also for 403).

delykj’s picture

Thanks Merlin,

Just for reference:
If You enable the "Disable Drupal blocks/regions" panels option, Drupal renders the page twice (one panels page content and one "The requested page could not be found." page content).

merlinofchaos’s picture

Is this only on the 404 page?

delykj’s picture

Yes, only on the 404 page.
This feature is coming from the ctools_context_handler_render function:

// Only directly output if $page was set to true.
        if (!empty($info['no_blocks'])) {
          print theme('page', $info['content'], FALSE);
          return;
        }
        else {
          return $info['content'];
        }

and in drupal_not_found function:

if ($path && $path != $_GET['q']) {
    // Set the active item in case there are tabs to display, or other
    // dependencies on the path.
    menu_set_active_item($path);
    $return = menu_execute_active_handler($path); //<---- Panel page rendered
  }
....
// To conserve CPU and bandwidth, omit the blocks.
  print theme('page', $return, FALSE); //<- second page rendered
merlinofchaos’s picture

Pretty awesome. There is probably absolutely nothing we can do about that.

Status: Fixed » Closed (fixed)

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

broncomania’s picture

I agree with this problem and there is no solution out yet? because it looks ... ugly.

merlinofchaos’s picture

I think the solution is to not check the ignore blocks box?

broncomania’s picture

hmm sounds logical :-), but what about the regions that will be displayed?
Should i make an own page template without this regions?

luksak’s picture

Version: 6.x-3.7 » 7.x-3.x-dev
Status: Closed (fixed) » Active

Why is this marked as fixed? It is not really... Right?

luksak’s picture

Version: 7.x-3.x-dev » 6.x-3.7

Didn't mean to change the version...

japerry’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing this issue as outdated as Drupal 6 ctools is not supported. If this issue is relevant for Drupal 7, feel free to re-open and mark for Drupal 7 (or 8)