The current code in profile2_regpath_form_alter() for determining the path does not work if the site is in a subdirectory. The code can be simplified from

      // Get profile2 profile types from current path.
      $url = drupal_parse_url($form['#action']);
      $path = ltrim($url['path'], '/');

      // Check to see if this is an alias. If so, use source path.
      if ($source = drupal_lookup_path('source', $path)) {
        $path = $source;
      }

to

$path = current_path();

which will fix the problem.

Comments

nevets created an issue. See original summary.

kostask’s picture

Status: Active » Closed (duplicate)

You are right nevets. The same problem is also discussed in https://www.drupal.org/node/2541374 and there is a patch there, so I am marking this post as duplicate.