Questions tagged [migration]
The migration tag has no usage guidance.
137
questions
1
vote
1
answer
29
views
Save matrix/neo field value programmatically only for one site/locale
During the sample content migration I save programmatically the matrix/neo field value in entry using saveElement method. In field settings is set "Only save blocks to the site they were created ...
0
votes
2
answers
34
views
How to disable all entries of certain section types?
I need to disable all the entries of 3 (related) sections. After that I'll be running some imports and all actual data will be enabled again (within the correct sites). We're talking about around 2....
1
vote
1
answer
44
views
Best way to do migrations on CraftCMS4
I'm trying to find out how to organize the cooperative work with a project on CraftCMS4. For example, I want to check a branch from a college that developing a new module, and switching to his branch ...
2
votes
1
answer
20
views
Updating specific field in from block in matrix field via migration
I'm trying to update a specific field (a dropdown) in an existing block (of type 'subhoofding') in an existing matrix field 'contentBuilder'
The migration itself runs fine, show the new value as ...
2
votes
1
answer
68
views
Migrating a Craft 4 instance from MySQL to PostgreSQL
I've managed to convert a fairly basic Craft 4 MySQL db to PostgreSQL using the pgloader tool, which came with it's own auth related issues when running PSQL v14+ instance - see https://github.com/...
1
vote
1
answer
22
views
How to create multiple migrations that depend on each other
lets say i want my plugin to have migrations that:
create entry section
create field group
create text field, belonging to newly created field group
assign text field to entry type field layout
...
0
votes
0
answers
81
views
getDiscountByCode(): Argument #1 ($code) must be of type string, null given
I migrated to craft 4 according to the migration guide and everything went well.
Steps to reproduce
Migrate to craft
Add something into the cart
On the Cart template there is the following error on ...
1
vote
1
answer
20
views
Migrations out of sync
I am trying to update a craft website.
However this fails.
Looking into the migrations table, there were no migrations where track column is "craft", there were some where the track was &...
0
votes
0
answers
18
views
developer wanted to migrate site from aws to Cloudways [duplicate]
I am seeking to hire a craft developer who has experience in migrating a site from AWS to Cloudways. is there anyone interested in applying?
1
vote
1
answer
22
views
Remove deleted migration content without migrate/down
I've started to play around with content migrations and have been following the Craft Quest course on the subject.
I'm not sure if this is a situation you should ever find yourself in, in an ideal ...
0
votes
0
answers
23
views
How to create an entry translated to multiple website in single save?
I'm creating a new entry from fetching values from existing entry. I have got all revision of existing entry in array. while creating a new entry with existing values I cant able to replicate the ...
1
vote
1
answer
102
views
How to add and run migration from plugin root folder?
I'm trying to add a new table to an existing plugin.
I can't add it to the Install migration as I want existing installations to pull the change.
The problems I ran into:
I can't run Craft CLI (php ...
1
vote
1
answer
182
views
migration failed m210613_145522_sortable_global_sets
I am getting this error when processing the upgrade
m210613_145522_sortable_global_sets
m210613_184103_announcements
m210829_000000_element_index_tweak
applying m210613_145522_sortable_global_sets
...
3
votes
1
answer
786
views
Upgrade to Craft 4
Anyone succeeded in upgrading from Craft 3 to Craft 4 ?
Before staging the changes on our dev server, I tried it locally without success. Although it seems pretty strait forward, I updated all plugins ...
2
votes
1
answer
405
views
DB CPU running at 100%, Pages Never Load, Moving from MySQL to MariaDB
I've been running a somewhat busy database (~800Mb) in GCP SQL. Due to the cost of it I've been working on migrating to a custom server running MariaDB. Which I'd heard could be much more cost ...
1
vote
1
answer
188
views
Migrating Craft CMS 2 to 3
I have a craft CMS 2 codebase that a former developer had made for running on our PHP 5 server. Recently, the server upgraded its PHP version to 7.3 so I am trying to migrate the website to a later ...
1
vote
1
answer
178
views
Newbie: Migrating Craft website to new host questions
I've no experience of Craft but do have 'historic' (pre Gutenberg) experience of front-end Wordpress. From the Dashboard they seem very different.
Am investigating migrating to new host as we are ...
1
vote
0
answers
265
views
Migration fails during update to 3.7.7
I'm updating a Craft installation from 3.5.17.1 to 3.7.7 and it's failing when applying migrations.
I'm trying to do the update via CLI on MAMP. Here is the relevant part of the error:
*** applying ...
1
vote
1
answer
60
views
Reapplying Users and Related Content to Database During Pipeline Promotion
I was on a dev ops call this afternoon and am wondering about the viability of a proposed solution for pushing changes to a Craft product through a dev pipeline.
For context, this is for a big company ...
2
votes
1
answer
180
views
CraftCMS admin login page error "Account Suspended"
Our website was created a couple years ago and our web designer is no longer with us. We have had access to the admin portion of our site and this is how we keep it up to date.
This week when we went ...
1
vote
2
answers
141
views
Synching content and template files across environments
I'm new to CraftCMS and have a few basic questions about synching contents between local and remote development environments. This has been discussed in other posts by I'm looking for more specific ...
1
vote
0
answers
230
views
Craft warning: Tried to release a savepoint, but it does not exist
I'm working on a plug-in for Craft 3. For this plug-in is a migration is needed.
When this migration runs and adds the entries, fields, and groups then the following warning occurs in the logs.
[...
3
votes
1
answer
204
views
what is the correct way to programmatically set checkboxes (MultiOptionsFieldData) in a migration? (solved)
I need to update existing entries after the creation of a checkbox fields, to apply the default value to everything that was created before the availability of the new field.
The code should run in a ...
2
votes
1
answer
799
views
Understanding migrations and CLI commands
Can someone please help explain some basics regarding migrations and the associated CLI commands to help troubleshoot when things fail? Specifically,
How does craft know which migrations have been ...
4
votes
1
answer
354
views
Automated deployment with content migrations and structural changes
In the knowledge base article there are 4 steps described to automate the deployment process
Pull updates for git
Run composer install
Run migrate/all
Run project-config/apply
The problem with this ...
1
vote
1
answer
43
views
After Migration from v2.9 to 3.5 - some entries added into an entry-relation-field get added twice after saving
We migrated a craft cms site with 3 locales from v2.9 to 3.5
We have a section with a field of type "Entries".
When editing the entry, and adding certain entries to this field, those get ...
1
vote
1
answer
54
views
Kentico to Craft
We’re evaluating the option of migrating our website, which currently runs on Kentico webforms, to Craft.
Do you know of tools and services which make this easier than a re-build?
1
vote
1
answer
33
views
Running plugin migrations when other plugin is installed?
I'm creating a plugin (A) that has optional support for another 3rd party plugin (B). When my plugin A is installed, I create a number of tables. If plugin B is also installed my migrations create ...
1
vote
1
answer
41
views
Migrating categories from Entry to Asset
Is it possible to migrate content like categories from an entry to an asset easily?
Each entry has an image asset and I'd like to move all the categories on the entry to the asset.
Would this require ...
2
votes
1
answer
58
views
Programatically setting dropdown options in a matrix
I'm building a Matrix field from within a module's migration.
I can get all fields setup correctly except the options of either a Dropdown or Checkboxes field.
$field = new \craft\fields\Matrix([
'...
2
votes
1
answer
36
views
Unavailable plugin during migration to craft 3
During a migration from craft 2 to craft 3, I stumble in 3 issues with plugins.
Plugins are not available in craft 3. For example,"instablog" plugin
Reinstall paid license plugins.
Custom plugins.
...
3
votes
2
answers
246
views
Migrate Craft CMS installation from PgSQL to MySQL - any hints?
We need to migrate a Craft installation with a pgsql dump to MySQL.
Any hints on the procedure?
Thanks,
Matthias
1
vote
1
answer
56
views
Assign a category group to a category field via migration
I am writing a plugin that sets up Craft in a particular way and have created a category field, but can't figure out how to assign a category group to the field, I have the following:
protected ...
1
vote
1
answer
41
views
Error trying to run Migrate from terminal on Craft 3.4
I am attempting to migrate the content from Form Builder for Craft 2 to Form Builder for Craft 3 by Roundhouse, by using the following command in terminal:
./craft migrate/up --plugin=roundhouse/form-...
1
vote
1
answer
242
views
Sprout Forms migration error
Running a migration from the command line ./craft migrate/all I get the following error message:
Exception 'craft\errors\MigrateException' with message 'An error occurred while migrating Sprout ...
1
vote
1
answer
47
views
Text cut off after migration in some fields
I migrated a site from Craft 2 to Craft 3 and on some Redactor fields, half the text is gone. It looks completely random. In some fields, the text is gone. In some the text is about half as long as ...
1
vote
1
answer
158
views
Updating old setup (3.0.41.1) to 3.1.0 various errors every time
I'm unfortunately dealing with a very old system that hasn't been updated in a long time. I've been able to update it up to 3.0.41.1 but once I attempt to go any further I get tons of different errors....
1
vote
1
answer
37
views
How to create a new site (locale: de-AT) based on another site (de) within same installation?
I manage a website with multiple languages. Each language has its own site and domain. Think: website.de and website.co.uk
I have to add another site with different locale (de-AT) to the Craft CMS ...
1
vote
1
answer
157
views
Flush Compiled Templates Migration File breaks Craft Migration Setup from 3.0 to 3.3
I was attempting to upgrade my Craft CMS from 3.0 to 3.3.19 on my production site. I had tested this out on several dev environments and worked with no issue. However, when doing it live I ran into a ...
1
vote
1
answer
188
views
Creating and saving a GlobalSet element type in Craft 3
The following code is in a migration. It runs fine and there are no errors and prints SAVED, but nothing is saved in the globalsets database table.
All my other content migrations run fine so it is ...
3
votes
1
answer
435
views
How to import entries from Craft 2 to Craft 3?
So, I've been working on a Craft 3 upgrade, managed to set everything up, including configuring new plugins etc. Since I've started working on the upgrade process, some new entries have been published ...
1
vote
1
answer
225
views
Only Install migration is applying on plugin install
I have a custom plugin which is added via path repository on local.
I have some migrations in the src folder.
My problem is if I uninstall the plugin and install it again, I can see all of the ...
0
votes
1
answer
325
views
Plugin RegisterUrlRulesEvent - cannot find Controller aciton -> 404
The error I'm getting:
HTTP 404 – Not Found – yii\web\NotFoundHttpException
Page not found.
↵
Caused by: Invalid Route – yii\base\InvalidRouteException
Unable to resolve the request "Expedweather/...
1
vote
1
answer
352
views
Plugin RegisterUrlRulesEvent - Regex URL-Routing gives 404
I'm updating a Craft 2 plugin to Craft 3 and I'm having difficulties getting the Regex URLs working correctly. The eocs I'm using: Craft3 Docs
I used pluginfactory.io to create the basic craft3 ...
2
votes
1
answer
518
views
How to manage breakpoint releases when updating Craft via composer
When logged in to Craft, the "Utilities" tab will show you all the latest releases you can update to. In some cases, it will report that you have reached a breakpoint release:
You’ve reached a ...
1
vote
1
answer
49
views
How to limit sources for Entries field set up via migration
I'm seeting up all of my project's fields using migrations.
This works really well, but I haven't been able to figure out how to limit the sources (sections) for an entry selection field.
I've based ...
1
vote
1
answer
93
views
Migration: Removing field from GlobalSet/Entry
Im creating my own migrations to better handle adding/removing fields on all environments.
Is the following safeDown() function the correct way to remove a field from a fieldlayout? It works but im ...
1
vote
0
answers
50
views
Migrate forms from EE2 Freeform to Craft 3 Freeform
I need to migrate some forms from Freeform in ExpressionEngine 2 to Freeform in Craft 3. Do you know of any tools or methods that exist that can help me out with this? Or am I doomed to do this ...
1
vote
1
answer
2k
views
Migrating from Craft CMS to WordPress
I have recently discovered our company website is run on Craft CMS. However, I do not like the system and am much more proficient on WordPress. Is there a way to move our site to WordPress without a ...
1
vote
1
answer
105
views
Database migrations on environments - in which env do I apply updates to Craft and Plugins?
When developing a Craft 3 site on a multi-environment setup, where would I apply the Craft and Plugin updates?
Should I apply them locally and then commit and replace the database in the dev env, or ...