In ds.field_ui.inc the hidden input var ds_source is created this way:

// Add a destination so we can get back if layout has been changed.
  $form['ds_source'] = array(
    '#type' => 'hidden',
    '#value' => $base_url . $base_path,
  );

On my site, $base_url and $base_path have the following values by default:
$base_url = "http://localhost/men
$base_path = "/men/"

This causes the following value to be set for ds_source:
ds_source = "http://localhost/men/men/"
That of course is wrong; the correct path is:
ds_source = "http://localhost/men/"

I changed the setting of ds_source to the following:

// Add a destination so we can get back if layout has been changed.
  $form['ds_source'] = array(
    '#type' => 'hidden',
    '#value' => $base_url . '/',   //ADFMOD: $base_path with '/' since that doubled the dir as /men/men/
  );

Alternatively, the following would also work:

// Add a destination so we can get back if layout has been changed.
  $form['ds_source'] = array(
    '#type' => 'hidden',
    '#value' => $base_root . $base_path,
  );

$base_root will be: "http://localhost"

I don't know which is best, I just know the original code doens't work (for a site installed in a sub-domain).

If I have misunderstood the values of $base_root, $base_url and $base_path let me know.

Thanks.

Andrew.

Comments

swentel’s picture

Status: Active » Fixed

You're absolutely right, changed it to '$base_root . $base_path' . Committed and pushed, thanks for the report!

Status: Fixed » Closed (fixed)

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