Solved

Drupal - Page Route - Content template

Posted on 2010-11-22
1
459 Views
Last Modified: 2012-05-10

 Hi All,

I can't seem to get the page route module to move to the next page, after it creates the profile page. 1. I created a route called Registration 2. Inside the route I have two pages, a) Content Profile Editing Form b) Node Add form

The page route should take the user to the profile create page, and then route to the create a group node page.

Problem is after the user is directed to the content profile editing form and clicks next, it redirects back to the profile form instead of going to the next page.

Any ideas, this does not seem normal at all.
 
0
Comment
Question by:VantaBods
1 Comment
 

Accepted Solution

by:
VantaBods earned 0 total points
ID: 34196694
Found a soluition:

I thought it might be a module or a coding change I have made so I decided to create a new drupal install and only install the modules needed.

I still had the same problem, very strange indeed. I eventually found the this article, with someone whom has had the same issues.

http://drupal.org/node/699458

The following needs to be added to the pageroute.module
<?php
/**
 * Submit function for all pageroute forms, except submit-like tab buttons
 * Redirect to the set target.
 */
function pageroute_page_form_submit($form, &$form_state) {

  $page = &$form_state['page'];
  $route = &$form_state['storage']['route'];

 /* hack saturnino part */
  if(!empty( $page->options['neighbours']['forward']) )
  {
        drupal_redirect_form($form, $route->path.'/'.$page->options['neighbours']['forward']);
        return;
  }
  /* hack saturnino part */

  // no page access -> try redirect
  if (!$route->checkPageAccess($page->name, $form_state['target'])) {
    unset($form_state['storage']);
    $form_state['rebuild'] = FALSE;

    if ($route->options['redirect_path']) {
      drupal_redirect_form($form, pageroute_get_redirect_path($page));
      return;
    }

    drupal_not_found();
    pageroute_exit_now();
    return;
  }

  $form_state['rebuild'] = TRUE;
}
?>

Open in new window



0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we will look at our content management system as a whole, to get an idea of how we will start to manage these content items.
This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now