From c8b89f497650d16440bb7d2f629f06b853072872 Mon Sep 17 00:00:00 2001 From: Ben Parizek Date: Sun, 30 Jun 2024 00:20:00 -0400 Subject: [PATCH] Preps configuration and upgrade guides for Craft 5 --- docs/.vitepress/config.mts | 73 +++++---- docs/configuration/sprout-config.md | 2 +- docs/update-guides/data-studio.md | 51 +------ docs/update-guides/forms.md | 15 +- docs/update-guides/index.md | 41 ++++-- docs/update-guides/sitemaps.md | 52 +------ docs/update-guides/sprout.md | 220 +--------------------------- 7 files changed, 77 insertions(+), 377 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index a5de5030..cebd30b6 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -91,16 +91,16 @@ export default defineConfig({ // {text: 'FAQ & Examples', link: '/examples-email/faq'}, // ] // }, - // { - // text: 'SEO Metadata', - // collapsed: false, - // items: [ - // {text: 'Meta Tags & Schema', link: '/meta'}, - // {text: 'Redirects', link: '/redirects'}, - // {text: 'Sitemaps', link: '/sitemaps'}, - // {text: 'FAQ & Examples', link: '/examples-seo/faq'}, - // ] - // }, + { + text: 'SEO Metadata', + collapsed: false, + items: [ + // {text: 'Meta Tags & Schema', link: '/meta'}, + {text: 'Redirects', link: '/redirects'}, + {text: 'Sitemaps', link: '/sitemaps'}, + {text: 'FAQ & Examples', link: '/examples-seo/faq'}, + ] + }, ], '/support/': [ @@ -137,24 +137,19 @@ export default defineConfig({ text: 'Update Guides', items: [ {text: 'Updating Sprout', link: '/update-guides/index'}, + {text: 'Upgrading from Craft 4', link: '/update-guides/sprout'}, ] }, - { - text: 'Plugins', - items: [ - {text: 'Data Studio', link: '/update-guides/data-studio'}, + // { + // text: 'Plugins', + // items: [ + // {text: 'Data Studio', link: '/update-guides/data-studio'}, // {text: 'Email', link: '/update-guides/email'}, // {text: 'SEO', link: '/update-guides/seo'}, - {text: 'Redirects', link: '/update-guides/redirects'}, - {text: 'Sitemaps', link: '/update-guides/sitemaps'}, - ] - }, - { - text: 'All Plugins', - items: [ - {text: 'Craft 5', link: '/update-guides/sprout'}, - ] - } + // {text: 'Redirects', link: '/update-guides/redirects'}, + // {text: 'Sitemaps', link: '/update-guides/sitemaps'}, + // ] + // }, ], '/examples-data-studio/': [ @@ -202,18 +197,18 @@ export default defineConfig({ {text: '← Back to SEO', link: '/meta'}, ] }, - { - text: 'Metadata', - items: [ - {text: 'Troubleshooting FAQ', link: '/examples-seo/faq'}, - {text: 'Global Metadata in Templates', link: '/examples-seo/global-metadata-in-templates'}, - {text: 'Element Metadata Field', link: '/examples-seo/element-metadata-field'}, - {text: 'Template Metadata Overrides', link: '/examples-seo/template-metadata-overrides'}, - {text: 'Canonical URLs', link: '/examples-seo/canonical-urls'}, - {text: 'Block Search Robots', link: '/examples-seo/block-robots-on-dev-site'}, - {text: 'Elements Without URLs', link: '/examples-seo/elements-without-urls'}, - ] - }, + // { + // text: 'Metadata', + // items: [ + // {text: 'Troubleshooting FAQ', link: '/examples-seo/faq'}, + // {text: 'Global Metadata in Templates', link: '/examples-seo/global-metadata-in-templates'}, + // {text: 'Element Metadata Field', link: '/examples-seo/element-metadata-field'}, + // {text: 'Template Metadata Overrides', link: '/examples-seo/template-metadata-overrides'}, + // {text: 'Canonical URLs', link: '/examples-seo/canonical-urls'}, + // {text: 'Block Search Robots', link: '/examples-seo/block-robots-on-dev-site'}, + // {text: 'Elements Without URLs', link: '/examples-seo/elements-without-urls'}, + // ] + // }, { text: 'Redirects', items: [ @@ -259,14 +254,14 @@ export default defineConfig({ port: 5173, // Use port 3000 for dev server. // port: 4173, // Use port 3000 for dev server. strictPort: true, // Don't try next available port if 3000 isn't available. - origin: 'http://demo.projectmothership.com.ddev.site:5174', // Rewrite asset URLs explicitly since the CMS web server is on a different host. - // origin: 'http://demo.projectmothership.com.ddev.site:4173', // Rewrite asset URLs explicitly since the CMS web server is on a different host. + origin: 'http://5.projectmothership.com.ddev.site:5174', // Rewrite asset URLs explicitly since the CMS web server is on a different host. + // origin: 'http://5.projectmothership.com.ddev.site:4173', // Rewrite asset URLs explicitly since the CMS web server is on a different host. hmr: { port: 5173, clientPort: 5174, // port: 4173, // clientPort: 4174, - host: 'demo.projectmothership.com.ddev.site', + host: '5.projectmothership.com.ddev.site', protocol: 'wss', }, } diff --git a/docs/configuration/sprout-config.md b/docs/configuration/sprout-config.md index 15b63e11..2dc4839f 100644 --- a/docs/configuration/sprout-config.md +++ b/docs/configuration/sprout-config.md @@ -5,7 +5,7 @@ description: Configuration settings for the sprout plugins. # Config Settings -Sprout settings are configured on a per-module basis and documented in the Control Panel and the [example config files](https://github.com/barrelstrength/craft-sprout/tree/v4/configs) in the root of the repository. +Sprout settings are configured on a per-module basis and documented in the Control Panel and the [example config files](https://github.com/barrelstrength/craft-sprout/tree/v5/configs) in the root of the repository. Configuration settings are managed across five areas: diff --git a/docs/update-guides/data-studio.md b/docs/update-guides/data-studio.md index 3219689c..eb1cb146 100644 --- a/docs/update-guides/data-studio.md +++ b/docs/update-guides/data-studio.md @@ -5,53 +5,10 @@ description: Sprout Data Studio update guide. # Updating Data Studio -## v4.44.444 - February 20, 2023 +## v5.0.0 - July 2024 -Sprout Reports is now Sprout Data Studio and now includes integrated Commerce Data Sets and Date Range Helper classes. Data Sets now support a custom field layout and element sources can be customized based on a Data Source condition rule or any custom fields in your field layout. +This release adds Craft 5 support and focuses on compatibility. -### Breaking Changes +- Upgrade plugin to the latest version on Craft 4.x +- Follow the standard Craft -::: warning -Due to this plugin's name change (Reports => Data Studio) you will need to manually install it and manually update to your new license key after upgrading to Craft 4 to trigger its migrations. If you have any Report-related dashboard widgets you may see an error when you first login to your Craft 4 control panel. Navigate directly to the plugins page `/admin/settings/plugins` to install the plugin. - -Once you've updated Sprout Reports to the latest on Craft 3, you can remove it from the composer.json file. Once upgraded to Craft 4, you can install Sprout Data Studio via composer or from the plugin store. -::: - -### License Migrations - -Existing Sprout Reports license holders have received a new Sprout Data Studio Pro license in the same Craft Console account for the old Sprout Reports license key. Once installing Data Studio, you will need to manually add your new licenses key to your Craft installation. Your new Data Studio license will have the same expiration as the old Sprout Reports license and you will need to manually re-select the auto-renew option in your Craft Console. - -### Data Studio - -- Sprout Reports has been renamed to Sprout Data Studio -- Sprout Data Studio now has a Lite and Pro Edition. -- Updated variable `craft.sproutReports` => `sprout.twigDataSet` -- Twig Template Data Sources that use a Craft DateTime picker in their templates will need to update the date syntax to use Twig the [date function](https://craftcms.com/docs/4.x/upgrade.html#template-functions) -- Twig Template Data Sources should update `{%- includejs %}` => `{%- js %}` -- Any references to the Project Config settings key should be updated `sprout-reports` => `sprout-module-data-studio` -- Custom DataSources should use `BarrelStrength\Sprout\datastudio\datasources\DataSource` (See `vendor/barrelstrength/sprout/src/datastudio/components/datasources` for examples) -- Access Data Source permissions have been removed in favor of Craft User permissions. Confirm any permissions that were previously assigned to Data Sources are now assigned to the User Groups appropriately. -- Date Sources used as email lists will need to be migrated manually to Audience Types (once the email module is released) - -### Framework - -- See the general [upgrade guide][#400-framework] for Sprout Modules to 4.0 - -[#400-framework]: ../update-guides/sprout.md - -## v4.46.0 - September 5, 2023 - -This release includes a breaking change if you are using Source Groups to group your Data Sets. Sprout provided a method to group Data Sets in Craft 3 and due to some inconsistencies with multi-site functionality we have decided to remove this from Craft 4, effective immediately, in favor of using the Data Studio Global Field Layout and Craft's native Custom Sources. - -As plugin migrations should only touch schema controlled by the plugin itself, you will need to manually implement this change if you desire to group your Data Sets in the sidebar of the element index page. No Data Set settings are changed in this update aside from the group metadata. - -### Breaking Changes - -To implement custom sources for your Data Set you must be an Admin: - -1. Add a custom Dropdown or Relation field to your Data Set field layout `Settings->Data Studio->Field Layout` -2. Edit any Data Sets you want to group and select the appropriate value in your new field -3. On the Data Sets Element Index page, select the gear icon and choose "Customize Sources" -4. From the "Customize Sources" modal, select the `+` icon and choose "New custom source" -5. Give your custom source a Label and select your Custom Field and Data Set Criteria to create a Condition Rule -6. Repeat step 5 for each custom source you want to add \ No newline at end of file diff --git a/docs/update-guides/forms.md b/docs/update-guides/forms.md index a92f29e2..1ef5c1a9 100644 --- a/docs/update-guides/forms.md +++ b/docs/update-guides/forms.md @@ -3,19 +3,6 @@ date: 2023-09-25 description: Sprout Forms update guide. --- -# Upgrading to Forms v4.44.444 +# Upgrading to Forms v5 -Sprout Reports is now Sprout Data Studio and now includes integrated Commerce Data Sets and Date Range Helper classes. Data Sets now support a custom field layout and element sources can be customized based on a Data Source condition rule or any custom fields in your field layout. -## Breaking Changes - -### Source Groups have been removed in favor of Custom Sources - -To implement custom sources for your Forms you must be an Admin: - -1. Add a custom Dropdown or Relation field to your Form Type field layout `Settings->Data Studio->Field Layout` -2. Edit any Forms you want to group and select the appropriate value in your new field -3. On the Forms Element Index page, select the gear icon and choose "Customize Sources" -4. From the "Customize Sources" modal, select the `+` icon and choose "New custom source" -5. Give your custom source a Label and select your Custom Field and Form Criteria to create a Condition Rule -6. Repeat step 5 for each custom source you want to add diff --git a/docs/update-guides/index.md b/docs/update-guides/index.md index d1af3b42..c5df0d70 100644 --- a/docs/update-guides/index.md +++ b/docs/update-guides/index.md @@ -5,22 +5,39 @@ description: Update guides for Sprout plugins. # Updating Sprout -The Sprout plugins are built using the Sprout Framework – a collection of modules - so that plugins can share core functionality. Plugin changelogs reference the modules that have changed, and the [Sprout Framework Changelogs](https://github.com/barrelstrength/sprout/tree/v4/CHANGELOG) document all the updates in the underlying modules. +The Sprout plugins are built using the Sprout Framework – a collection of modules. Plugin changelogs reference the modules that have changed, and the [Sprout Framework Changelogs](https://github.com/barrelstrength/sprout/tree/v5/CHANGELOG) document all the updates in the underlying modules. -The upgrade guides are organized by plugin and releases are listed by date. Where appropriate, a plugin might link to update notes in another plugin. For example, the Sprout Forms changelog might link to the Sprout Email changelog for a particular update if notable changes have been made to email-specific features. +[//]: # (Update guides are created for a plugin when there are notable changes. ) -::: warning Migrations and Craft Commands -Sprout plugins for Craft 4 currently require that you update via the browser to trigger migrations. Running `./craft migrate/all` will not trigger the Sprout module migrations. +[//]: # (If you don't see an update guide, follow the standard Craft update process for the plugin.) -Each Sprout module has its own migration track and a single migration might get triggered by one or more modules. Sprout plugins manage the order that migrations need to run and ensure that migrations only run once, but, currently, Craft's CLI commands for migrations do not consider the scenario where a plugin runs migrations that are not using the plugin migration track. We're working on finding a Craft-friendly way to handle this scenario, but for now, to ensure all Sprout migrations run correctly you'll need to run migrations via the Update button in the browser. -::: +[//]: # (The update guides are organized by plugin and releases are listed by date.) ## Update Guides -The update guides are primarily for notable changes. Not all plugin versions will appear here in the update guides. See the changelogs for a given plugin for more detailed notes on every release. +- [Upgrading from Craft 4](./sprout.md) -- [Sprout Data Studio](./data-studio.md) -- [Sprout Email](./email.md) -- [Sprout Redirects](./redirects.md) -- [Sprout Seo](./seo.md) -- [Sprout Sitemaps](./sitemaps.md) +[//]: # (## Sprout Plugin Update Guides) + +[//]: # (The following plugins have update guides available.) + +[//]: # (If you don't see an update guide for a plugin, follow the standard Craft update process for the plugin.) + +[//]: # (## Sprout Plugin Update Guides) + +[//]: # (The following plugins have update guides available.) + +[//]: # () +[//]: # (The update guides are primarily for notable changes. Not all plugin versions will appear here in the update guides. See the changelogs for a given plugin for more detailed notes on every release.) + +[//]: # (- [Sprout Data Studio](./data-studio.md)) + +[//]: # (- [Sprout Forms](./forms.md)) + +[//]: # (- [Sprout Email](./email.md)) + +[//]: # (- [Sprout Redirects](./redirects.md)) + +[//]: # (- [Sprout Seo](./seo.md)) + +[//]: # (- [Sprout Sitemaps](./sitemaps.md)) diff --git a/docs/update-guides/sitemaps.md b/docs/update-guides/sitemaps.md index 97d61139..2a96c5b1 100644 --- a/docs/update-guides/sitemaps.md +++ b/docs/update-guides/sitemaps.md @@ -5,55 +5,7 @@ description: Sprout Sitemaps update guide. # Updating Sitemaps -## v4.44.444 - September 25, 2023 +## v5.0.0 - July 2024 -This release adds Craft 4 support and a few new features such as Content Query Sitemaps and improved navigation. - -Sitemaps now has a Lite and Pro version. License holders can continue to use their existing license key for as a Pro license on Craft 4. - -### Breaking Changes - -- See the general [upgrade guide][#400-framework] for Sprout Modules to 4.0 -- Lite Edition allows managing up to 5 Content and Content Query Sitemaps per Site -- Custom Sitemap Metadata integration has been updated from `barrelstrength\sproutbaseuris\services\UrlEnabledSections::EVENT_REGISTER_URL_ENABLED_SECTION_TYPES` => `BarrelStrength\Sprout\sitemaps\sitemapmetadata\SitemapMetadata::EVENT_REGISTER_ELEMENT_SITEMAP_METADATA` - -### Notable Changes - -#### Generated URLs for individual sitemaps have changed - -Your `/sitemap.xml` Sitemap index exists at the same URL, however, the URLs listed in the Sitemap Index have changed. - -In Craft 3, Content Sitemaps displayed with a 12 character key: - -``` xml{4,8} - - - - {{ siteUrl }}sitemap-G76D5Oizt4fH-1.xml - {{ now|date('Y-m-d') }} - - - {{ siteUrl }}sitemap-9O2U0q1gdvPM-1.xml - {{ now|date('Y-m-d') }} - - -``` - -In Craft 4, Content Sitemaps display using the Sitemap Metadata UID key: - -``` xml{4,8} - - - - {{ siteUrl }}sitemap-0a0c9e98-fe8b-430a-9b47-f3e521dd048e-1.xml - {{ now|date('Y-m-d') }} - - - {{ siteUrl }}sitemap-0a0c9e98-fe8b-430a-9b47-f3e521dd048e-2.xml - {{ now|date('Y-m-d') }} - - -``` - -[#400-framework]: /update-guides/sprout.md +This release adds Craft 5 support and focuses on compatibility diff --git a/docs/update-guides/sprout.md b/docs/update-guides/sprout.md index 515a2081..5935243d 100644 --- a/docs/update-guides/sprout.md +++ b/docs/update-guides/sprout.md @@ -3,225 +3,17 @@ date: 2023-09-25 description: Update guide for Sprout Framework. --- -# Craft 4 +# Upgrading from Craft 4 -## v4.44.444 - 2023 - -All Sprout Plugins added Craft 4 compatibility at version `4.44.444` and are built on top of the new Sprout Framework `4.0.0` module. - -Sprout for Craft 4 and provides a familiar author experience, introduces a simplified plugin architecture with the Sprout Framework module, and removes the need for a number of dependencies that were causing several permission and migration issues on Craft 3 websites. Designers and developers will want to read through these upgrade notes carefully - several things have changed. - -### Prepare to upgrade - -1. Review all upgrade guides for Craft and Sprout to prepare for your upgrade -2. Review the 'Breaking Changes' section of the Sprout Module changelogs -3. Confirm that all of the Sprout plugins that you want to upgrade are available on Craft 4 -4. Confirm that you have a migration path for any plugins that will not be available on Craft 4 +Sprout v5 plugin releases are focused on compatibility with Craft 5. ### Upgrade -1. Update to the latest version of Craft 3 -2. Update all installed Sprout plugins to the most recent version on Craft 3 -3. Upgrade to Craft 4 (This step will trigger Sprout migrations for plugins with the same name) -4. Install any Sprout plugins with new names to trigger their respective migrations +Follow Craft's [Upgrading from Craft 4](https://craftcms.com/docs/5.x/upgrade.html) guide to upgrade to Craft 5. -#### Craft 3 Migration Path +Be sure to upgrade all installed Sprout plugins to the most recent version on Craft 4 before performing the upgrade to Craft 5. -Avoid incremental updates to older versions of Craft and Sprout. - -::: warning THERE IS A BETTER WAY -Sprout `4.44.444` added Craft 4 support, introduced a new plugin architecture, and solved several migration issues that had arisen in the older architecture. Before upgrading to Craft 4 and Sprout `4.44.444`, upgrade your site to the latest version of Craft 3.x and the most recent Sprout releases on Craft 3 all in one go. - -We recommend avoiding incremental upgrades (e.g. from `3.2` to `3.3` to `3.4`, etc.) as Craft 3 and Sprout did not play nicely together between Craft `3.2` and `3.7` and many of those issues are resolved if you can upgrade to the most recent version of Sprout on the latest version of Craft 3 with a single migration. +::: warning UPGRADING SPROUT FORMS +While most Sprout plugin upgrade to Craft 5 are focused on compatibility and have no breaking changes, Sprout Forms is a major upgrade. See the Sprout Forms upgrade guide for details. ::: -To upgrade Craft and Sprout to a version earlier than Craft `3.7.x` and Sprout `4.40.x`, please review the [Installing & Updating][#v3Docs] section in the Sprout v3 documentation for the specific plugins you are updating. - -[#v3Docs]: https://sprout.barrelstrengthdesign.com/docs/craft-v3/ - -### Breaking Changes - -#### All Sprout modules - -- See [CHANGELOG-CORE](https://github.com/barrelstrength/craft-sprout/blob/v4/CHANGELOG) for a full list of changes -- All Twig variables now use the `sprout` variable -- All Default templates sets can now be included from the site template root `_sprout` -- All Example templates can now be included from the site template root `_sprout/examples` -- All plugin settings are now managed in their respective modules -- Plugins no longer support an _Alternate Name_ setting -- Any references to Sprout Project Config settings keys will need to be updated -- All custom APIs have new routes and namespaces - -[//]: # (### Sprout Forms) - -[//]: # () - -[//]: # (- Updated Resource loading Asset Bundles for front-end forms. People may need to migrate over? Or can keep the old) - -[//]: # ( syntax? I think so... same filenames.) - -[//]: # () - -[//]: # (### Email) - -[//]: # () - -[//]: # (- Migration should add CC and BCC to TO field as comma-delimited emails? (Removed SendMethod, CC, and BCC)) - -[//]: # () - -[//]: # (### Fields) - -[//]: # () - -[//]: # (- REMOVED Notes field. Migrated to UI Elements.) - -[//]: # ( Craft's new UI Elements replaces the need for the Sprout Notes field? and others?) - -[//]: # () - -[//]: # (UI elements – Add custom headings, tips, warnings, and horizontal rules to your field layouts. You can even add custom) - -[//]: # (UI elements based on Twig templates. (Yes, plugins can register additional UI elements as well!)) - -[//]: # () - -[//]: # (- Release an update on 3.x for Notes field that notifies folks we'll be deprecating the Rich Text and HTML options and) - -[//]: # ( only migrating to Markdown via Craft's Tips/Warning UI elements in the future.) - -[//]: # () - -[//]: # (Review Phone field. In this case, it appears to be returning a string of a number if I kill the script and Craft::dd() - -[//]: # ($value) in the normalizeValue method. But, ideally we normalize this to be a form model so where does this string value) - -[//]: # (come from?) - -[//]: # (https://sprout.straightupcraft.com.ddev.site/admin/entries/sproutFieldExamples/21-field-test) - -[//]: # () - -[//]: # (So it looks like our Phone Field => Plain Text migration during the Craft 3 upgrade fails in some scenarios, leading to) - -[//]: # (a situation where you may have a phone field that has old number values from before the migration (1231231234) and new) - -[//]: # (format international JSON values for anything that was saved after the update.) - -[//]: # (It's hard for us to clean these up, because we don't know the international code we should put the numbers into, so old) - -[//]: # (values need to be updated manually. Or we need to switch all fields to PlainText leading to potentially plain text) - -[//]: # (fields with the new JSON values now. \) - -[//]: # (Build a utility that identifies where these exist and provide SQL queries that can identify all the IDs of the fields in) - -[//]: # (question (all phone fields in global context that don't contain a "{" or that do contain one) and another query that) - -[//]: # (uses those IDs to update and CONCAT the other format.) - -[//]: # () - -[//]: # (And migrated phone field as straight numbers 1231234111 vs {"country":"AS","phone":"707-654-1234"}) - -[//]: # (Make sure phone gets migrated properly or converted to Plain Text field.) - -[//]: # (We were supposed to migrate these to plain text in the upgrade to Craft 3... see where this fails or gets undone.) - -[//]: # () - -[//]: # (Review OLD Sprout Fields migrations (And make sure we're dealing with global/sproutForms scope properly)) - -[//]: # (m180221_161521_update_type.php <= this changes the classname before the following migrations run their queries looking for the old class name.) - -[//]: # (m180221_161522_notes_fields.php) - -[//]: # (m180221_161523_phone_fields.php) - -[//]: # (m180221_161524_email_select_fields.php) - -[//]: # (m180221_161525_regular_expression_fields.php) - -[//]: # (m180221_161526_link_fields.php) - -[//]: # (m180221_161527_email_fields.php) - -[//]: # (m180221_161528_hidden_fields.php) - -[//]: # (m180221_161529_invisible_fields.php) - -[//]: # () - -[//]: # (# REVIEW THINGS) - -[//]: # () - -[//]: # (SELECT *) - -[//]: # (FROM craft_content) - -[//]: # (WHERE field_phoneSprout LIKE '%{%';) - -[//]: # () - -[//]: # (SELECT *) - -[//]: # (FROM craft_content) - -[//]: # (WHERE field_phoneSprout NOT LIKE '%{%';) - -[//]: # () - -[//]: # (# GET IDS OF TARGET COLUMN DATA) - -[//]: # () - -[//]: # (SELECT id) - -[//]: # (FROM craft_content) - -[//]: # (WHERE field_phoneSprout LIKE '%{%';) - -[//]: # () - -[//]: # (SELECT id) - -[//]: # (FROM craft_content) - -[//]: # (WHERE field_phoneSprout NOT LIKE '%{%';) - -[//]: # () - -[//]: # (# UPDATE) - -[//]: # () - -[//]: # (UPDATE craft_content) - -[//]: # (SET field_phoneSprout = CONCAT('{"country":"AF","phone":"',field_phoneSprout,'"}')) - -[//]: # (WHERE field_phoneSprout NOT LIKE '%{%') - -[//]: # (AND id = @id;) - -[//]: # () - -[//]: # (UPDATE craft_content AS table1) - -[//]: # (JOIN) - -[//]: # (() - -[//]: # (SELECT id) - -[//]: # (FROM craft_content) - -[//]: # (WHERE field_phoneSprout NOT LIKE '%{%') - -[//]: # () table2) - -[//]: # (ON table1.id = table2.id) - -[//]: # (SET table1.field_phoneSprout = CONCAT('{"country":"AF","phone":"',table1.field_phoneSprout,'"}');) - -