As a follow-up for #2157783: Deploy_7 code has an unused old_uri

The D6 code does some rewriting of table data in platform/drupal/deploy.inc. While the D7 code only sets three file_*_path variables...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helmo’s picture

helmo’s picture

Tss ... the three file_*_path variables don't get used anyway as we write these values to the settings.php

So for D7 this is at the moment effectively a NO-OP.

helmo’s picture

Status: Active » Needs review
FileSize
2.1 KB

Here's a patch to review... with todo's :)

ergonlogic’s picture

In deploy.inc, we also support deploying from a site that had been installed in 'default'. Could we do that here too?

+++ b/platform/drupal/deploy_7.inc
@@ -11,12 +19,27 @@ $old_url = drush_get_option('old_uri');
-variable_set('file_public_path', "sites/$new_url/files");
-variable_set('file_private_path', "sites/$new_url/private/files");
-variable_set('file_temporary_path', "sites/$new_url/private/temp");

So... we don't need these anymore?

helmo’s picture

Yes, I'll thought about adding that. But I hoped to get the "get Field API to tell us all text fields and loop over the tables" todo resolved first.

So... we don't need these anymore?

Yes, I'll make that a separate commit to describe that these are already written to the settings.php. --> done fcec4d3a0beb9f73ecded28fdc2fcd582f9f4c65

I'm hesitant to commit the rest of this issue in such a late release candidate stage...

ergonlogic’s picture

Category: Feature request » Bug report

This looks more like a bug to me, since this functionality already exists for d6.

helmo’s picture

znerol mentioned in irc that https://api.drupal.org/api/drupal/modules%21field%21field.info.inc/funct... could help solve the todo "get Field API to tell us all text fields and loop over the tables ?"

helmo’s picture

Here's an updated patch.

* updated to D7 DB API
* re-added sites/default support

I've opened #2163979: Use Field API in deploy_7 code to rewrite in all content tables as a follow-up.

helmo’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Fixed

I committed this to 7.x-3.x after some more testing, and included #2163979: Use Field API in deploy_7 code to rewrite in all content tables

commit: 3d0d14a6702509efd470282d3450f682670e8122

I think this can also be committed to the 6.x-2.x branch, I've started the branch 6.x-2.x-backports to prepare this.

Status: Fixed » Closed (fixed)

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

ergonlogic’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Status: Closed (fixed) » Patch (to be ported)
Issue tags: +Aegir 2.1

This needs to get into 6.x-2.1

anarcat’s picture

Priority: Normal » Critical

Which means it's a critical.

helmo’s picture

Status: Patch (to be ported) » Fixed

Merged into 6.x-2.x

Status: Fixed » Closed (fixed)

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

  • Commit 3d0d14a on 7.x-3.x, dev-helmo-3.x by helmo:
    Issue #2157785 by helmo: Deploy_7 code lacks functionality from D6 code.
    
  • Commit fcec4d3 on 6.x-2.x, 7.x-3.x, 6.x-2.x-backports, dev-helmo-3.x by helmo:
    Issue #2157785 by helmo: Remove unused variables, these get written to...