Problem/Motivation

I was experimenting with config management on my local PC. I use Opensuse 13.2. Reproduce problem as follows

  • Install standard D8 to http://testserver/d8t1 with database d8t1
  • Copy site to second site http://testserver/d8t2 with database d8t2 as per https://www.drupal.org/node/2416545
    • Copy database d8t1 to d8t2 with phpMyAdmin
    • Copy files with a file manager from d8t1 directory to d8t2 directory
    • Adjust one line in settings.php of d8t2 to point to d8t2 databse
  • Within d8t2 site, toolbar items on both lines point to d8t1 site - This is an error
  • Other links, such as bread crumbs or links within page, point correctly to d8t2
  • I have not found a "rebuild menu" link in standard drupal
  • Drush cache-rebuild solves problem

Proposed resolution

Determine why main links are updated and toolbar links are not. The inconsistency is a problem in itself
Edit documentation about site copying if toolbar can't be fixed

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)

User interface changes

(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)

API changes

(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)

Data model changes

(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)

Original report by [username]

(Text of the original report, for legacy issues whose initial post was not the issue summary. Use rarely.)

Comments

AFowle created an issue. See original summary.

cilefen’s picture

A better title would be "Toolbar renders absolute links", because if it rendered relative links, this problem would not exist.

This is somewhat related:

#1494670: References to CSS, JS, and similar files should be root-relative URLs: avoids mixed content warnings & fewer bytes to send

AFowle’s picture

@cliefen If you know that to be the case, I should be happy to change it. However it seems to be a caching issue as well.

cilefen’s picture

I think I may be wrong about the relative links cure because these are subdirectory sites.

It isn't unusual to need a cache rebuild in Drupal when you move a site to a different URL. Whether or not that ought to be the case is debatable. I think update.php causes a a rebuild.

Chi’s picture

Category: Bug report » Support request

It's not a bug for me. drush cr is a required part of deployment process. Perhaps we should document this somewhere if it is not documented yet.

Wim Leers’s picture

Status: Active » Postponed (maintainer needs more info)

because if it rendered relative links, this problem would not exist.

Actually, it would still exist: for sites installed in subdirectories. If the subdirectory differs on the two servers, the same problem will occur.

I think I may be wrong about the relative links cure because these are subdirectory sites.

Heh, exactly.

#5++

Please clear caches and check if you can still reproduce this.

Version: 8.0.0 » 8.0.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.0.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Status: Postponed (maintainer needs more info) » Fixed

@AFowle, thanks for experimenting!

The comment in #5 suggests that the solution is to clear the cache (a solution supported by #6), a step that was not in the referenced doc page in 2015. An instruction to clear the cache was added to Workflow using the Drupal UI in 2016 by kiamlaluno.

Closing this as fixed

apaderno’s picture

Truly, it was added from joachim on September, 2016. I reverted a revision that added wrong changes.

Status: Fixed » Closed (fixed)

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