The installation hook implementation should automatically import Page Title settings as that functionality is now included. Will be added after #1281138: Upgrade path: Nodewords is done.

Comments

Status:Active» Needs review
StatusFileSize
new1.95 KB
PASSED: [[SimpleTest]]: [MySQL] 15 pass(es).
[ View ]

This adds a hook_update_N() script to migrate the data, which is also executed during the new hook_install(). If there's a lot of data this could take a while. It also is set to append " | [site:name]" to the value, which should provide the expected result.

Note: this does not do anything for any per-entity or per-bundle settings, right now it just converts the {page_title} database records.

Title:Write upgrade path from Page_Title to MetatagsUpgrade path: Page_Title
Issue tags:+upgrade path

Component:Miscellaneous» Code

Status:Needs review» Needs work

Needs further work.

Exciting to see a migration path for other modules to help bring them all together under "meta tag"

Related to #1282806: Upgrade path: Meta tags quick

Thank you!

DamienMcKenna++

Related to the issue referenced by HyperGlide in #5, I wonder if it'd be more appropriate to make a separate upgrade/import module (perhaps with drush support) rather than have everything in a series of upgrade hooks.

As it is, installing or updating the module will perform the data migration without asking. Seems like it should be an explicit action.

I'm getting a message after updating metatag to 7.x-1.0-beta4 that I should disable the page title module, but I don't want to loose it's data. Is the best path forward to apply this patch, run the update, and then disable & uninstall page_title?

Updating to beta4 + patch hosed my metatag data & page_title data, now all nodes say they are using defaults when there is clearly data in the database for metatags, but the key on language seems to be confusing matters.

Going to try beta3 instead.

Status:Needs review» Needs work

Things don't look much better after updating to beta3, there's still a key in the 'data' record for language, and all my nodes still think they are using defaults.

Going to try beta2 instead.

Status:Needs work» Needs review
StatusFileSize
new2.02 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch metatag-upgrade_path_from_page_title-1658970-10.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Okay, that worked great! I think the problems in beta3 and beta4 are unrelated to this patch.

An Update to Beta2 + attached patch migrated in all the data from page_title. It's rerolled here with a new update number (7003) and removal of a duplicate dsm, but will need another re-roll after the language / translation issues are sorted.

The last submitted patch, metatag-upgrade_path_from_page_title-1658970-10.patch, failed testing.

@jenlampton: The beta3 and beta4 problems are because of #1845326: Metatags not loading correctly with beta4, which has just been committed, so the -dev version should work much more reliably.

Status:Needs work» Needs review
Issue tags:-upgrade path

Status:Needs review» Needs work
Issue tags:+upgrade path

The last submitted patch, metatag-upgrade_path_from_page_title-1658970-10.patch, failed testing.

Was not able to apply #10 against beta7 or dev.

It is trying to patch /sites/all/modules/contrib/metatag/metatag.install however in our D 7.22 our modules are within /sites/all/modules/metatag/metatag.install.

Is this a bug?

Status:Needs work» Needs review
StatusFileSize
new2.16 KB
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]

Attempt to update the patch to the latest dev.

Status:Needs review» Needs work

Applied patch cleanly to dev on test site.

running update.php following errors stopped the update.

An AJAX HTTP error occurred.
HTTP Result Code: 500 Debugging information follows.
Path: http///meta.dev.domain.com/update.php?op=selection&token=0yysOh2aIQ&id=3158&op=do
StatusText: error
ResponseText: Recoverable fatal error: Argument 3 passed to metatag_metatags_load_multiple() must be an array, none given,
called in /sites/all/modules/metatag/metatag.install on line 934
and defined in metatag_metatags_load_multiple() (line 351 of /sites/all/modules/metatag/metatag.module).

I've decided that all import/migration scripts will be done as drush commands, so this definitely needs work.

Talking to Cottser in IRC he express that

in the dev version metatag_metatags_load() calls metatag_metatags_load_multiple() without the third argument, so there may be a bug in the dev version that is causing the error you saw.

http://drupalcode.org/project/metatag.git/blob/refs/heads/7.x-1.x:/metat...

Patch in #17 applied successfully and executed drush updb but it is giving loads of:

Missing argument 4 for metatag_metatags_save(), called in /var/www/hcl/docroot/sites/all/modules/contrib/metatag/metatag.install on line 906 and defined metatag.module:385

Also it is destroying the existing metatags after update.

@subhojit777 -- did you read the comments after #17?

@HyperGlide but I am not using the dev version. I am using 7.x-1.0-beta7 version of metatag.

I am using this module for migrating nodewords to metatag, after that I am doing drush updb and I see that existing metatag settings for nodes like description and keywords are no longer maintained.

I will try doing drush updb first then upgrade from nodewords to metatag.

Status:Needs work» Needs review
StatusFileSize
new4.39 KB
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]

The patch given #17 does not migrates pagetitle to metatags following the metatag config settings. For example, if a content type has certain metatag title setting then title should appear as per the setting, I think this should be the expected behavior. Here is a new patch that does this job.

StatusFileSize
new4.44 KB
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]

The patch given above does not trims whitespaces. Forgot to do that :)
Here is the correct patch.

I believe #25 needs to have the code updated as a result of other recent comments. Any interest to help get this accomplished and I can help support the testing.

I tried the patch with the latest release and with the current dev, but I get the following error:
Fatal error: Class name must be a valid object or a string in in /var/www/html/aosmith/public/includes/common.inc, line 7837

Any ideas?

Issue summary:View changes
Status:Needs review» Needs work