Questions tagged [database]

The tag has no usage guidance.

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
423 views

Diagnosing Slow Database Connection for Entries (Frontend and Craft Admin)

We have set up a remote database connection for Craft CMS so that I and my colleague can work on the same database locally. The connect seems very slow both front end and in the admin area. ...
Dan Lee's user avatar
  • 1,107
2 votes
0 answers
41 views

Data Model to Accommodate Statutory Text?

I am planning to build a searchable database of statutory text, and am wondering what would be the best way to model my data for ease of linking spot citations and related text. The statutes are ...
Brendon Carr's user avatar
1 vote
0 answers
22 views

Merging production version into local environment

My live Craft site was built by another dev a while back just before I joined the company, at the time of launching it I had it setup locally with docker and the most recent site files. Since it has ...
Sam St Aubyn's user avatar
1 vote
1 answer
312 views

Postgres SSL PDO config for config/db.php

Struggling to configure this correctly and cleanly. When I upgrade to latest 3.x Craft on staging, Craft can no longer connect to the Postgres DB, which uses SSL. Have had success up until CraftCMS ...
John's user avatar
  • 73
1 vote
0 answers
50 views

Limiting image transform totals in queue?

In order to serve webp images where possible, and different sizes for different screens etc, I created a bunch of image transforms over the weekend - forgetting just how many images we have in the ...
Emma Swann's user avatar
1 vote
1 answer
153 views

Special characters like ✓ are not being saved in text fields

we have just noticed that characters like ✓ are being saved in the title field but not in plain text fields regardless of the database type (PostgreSQL / MySQL) or field type in the database (text, ...
Lars Woehning's user avatar
1 vote
0 answers
78 views

Building a yii query for Connect plugin

I'm using the Connect plugin by Andrew Welch to get some data from an external database. Somewhere in the data, I need data from another related table. The way I'm doing this now is like this: {% set ...
Bart Rylant's user avatar
1 vote
0 answers
274 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. [...
randomGuy's user avatar
1 vote
0 answers
101 views

Very slow `INSERT` transactions on the resourcepaths table

After a recent update (Craft 3.4.x to 3.5.x) I'm seeing some suspiciously slow response times in relation to INSERT actions on the resourcepaths table. Some in the upwards of a half second for a ...
Aaron Bushnell's user avatar
1 vote
1 answer
288 views

Database Connection Error after updating from Craft 2 to 3

Good evening all, I am updating a small site from Craft 2 to 3, and after following the instructions in the documents, I loaded up the backend of my site and was greeted with the install screen. I ...
Shad's user avatar
  • 451
1 vote
0 answers
28 views

Storing complex field content (plugin)

I'm trying to work through some issues with the field content for our Maps plugin, but I'm not sure about the best way to go about it. Currently the value for each map field is stored as an element ...
Tam's user avatar
  • 389
1 vote
0 answers
612 views

Cannot add more fields - SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large

I've been bumping into a field limit when attempting to mirgrate fields in, which is a massive limitation for the way the site was originally set up. I've read a bunch of other threads where it's ...
Jammooka's user avatar
1 vote
0 answers
472 views

Craft 3 : Can't backup database ("failed with exit code -1")

I can't backup database, the log says : [error][yii\base\Exception] yii\base\Exception: Could not create backup: The shell command "mysqldump {{...blablabla...}} failed with exit code -1. in /...
laurent's user avatar
  • 171
1 vote
0 answers
127 views

Problems while setting up a cross region Craft website in AWS

In order to create a cross region setup for my craft website, I've created a read-only replica of my RDS DB from North Virginia region to Canada Central region. I'm facing the internal server error ...
Ankit Sahu's user avatar
1 vote
0 answers
45 views

The fieldtype class “insert fieldtype class here” could not be found

I'm specifically having this issue with Sprout SEO, but I would imagine the problem would persist across any plugin, given whatever solution is used. Anywho, so I've got three environments - dev, ...
Scott's user avatar
  • 11
0 votes
0 answers
15 views

Adding an entry to an Entry element duplicates it

I have a site where the database is is some weird state which I would like to fix, but I'm not sure where to start. I have a channel of entries, and some of these entries (not all of them) suffer from ...
jishi's user avatar
  • 263
0 votes
0 answers
29 views

Best Approach for Merging Two Craft CMS Sites with Database Changes to Avoid Data Loss?

I'm currently in the process of merging two Craft CMS websites into one. To achieve this, I've made several changes directly to the database locally, rather than managing these changes through Git and ...
Zico123's user avatar
0 votes
0 answers
25 views

Limit External API Calls From Plugin In Craft 2

I have a plugin in Craft 2 that will make an API call to an external API to gather and display data on a template; however, I would like to limit the number of calls to a certain number per second (or ...
buck1112's user avatar
  • 400
0 votes
0 answers
78 views

Duplicate entry '2022' for key 'categorygroups_sites.PRIMARY'

I'm trying to get a live site running locally (using DDEV) and having trouble importing the database. The database is an export from the live site (which is running and has been for a short time). ...
Jaytrix's user avatar
  • 187
0 votes
0 answers
70 views

PostgreSQL performance

Looking for someone well versed in the dark arts of PostgreSQL for some potential consultancy (or anyone that can offer hints, tips and advise). We have always worked with MySQL and made some naïve ...
Cole Henley's user avatar
  • 1,741
0 votes
0 answers
161 views

Why is my database stuck at the 'Creating sort index' query?

So I imported the production database locally and it is getting stuck at the 'creating sort index' stage of the query when I try to log in to the CMS. This is the Server Process table from SequelAce ...
Martin's user avatar
  • 43
0 votes
0 answers
48 views

Character encoding problem when move between PCs

I'm using MAMP PRO to develop site in local environment with Cloud functions for sync. Everything works fine except for character coding of entries' text. Evidently a problem with encoding but I can't ...
Edoardo Stefani's user avatar
0 votes
0 answers
305 views

Can someone help me solve for this error message: "Craft can't connect to the database with the credentials...."

Can someone help me solve for this error message: An exception has been thrown during the rendering of a template ("Craft can't connect to the database with the credentials in craft/config/db.php....
Cait H.'s user avatar
0 votes
0 answers
267 views

Very slow site speed

Most pages on our large site are taking far too long to load. I have gone through and made some template changes that have been suggested, and currently have been running rebuild search index for over ...
Emma Swann's user avatar
0 votes
0 answers
97 views

SQL Queries Performing Full Table Scan

Per the title, our application's db query has from time to time pegged our CPU to the max and taken down the site. Our site has gotten quite large in terms of content and trying to figure out how best ...
zhua89's user avatar
  • 31
0 votes
0 answers
29 views

Adding A Soft Delete in Craft 2 Entries

I've been thinking of adding a "Soft Delete" or just perhaps a means in which deleting in certain sections (e.g. News) will archive the entry with an update, rather than deleting it. As I ...
buck1112's user avatar
  • 400
0 votes
0 answers
173 views

Certain Queries Pegging CPU and Causing Production Site to go Down

I read these two posts MySQL CPU pegged on specific query Poor performance on midsized site / Queries without index? and and am in a similar situation although for us it actually breaks our site and ...
zhua89's user avatar
  • 31
0 votes
0 answers
59 views

SyncDB with Nitro Fail to sync database from local to staging

I'm trying to sync the database for my local Craft Nitro to the staging environment using SyncDB. Here is the error, [2021-06-04T15:49:51.623536+08:00] sync.NOTICE: Starting database sync [] [] [2021-...
Lee's user avatar
  • 139
0 votes
0 answers
266 views

When Using Nitro Add and it gets to the choose database engine question, the choices arent there and typing in doesn't work

I'm totally new at craft cms and nitro and I'm having trouble adding a new site. When I get to the part where it asks you which database engine to use there's no options there to choose from and ...
Claire Browne's user avatar
0 votes
0 answers
37 views

Need to populate new field based on existing data

Say I have a section called "Stores" that has an existing field called "Store Hours". The client has populated the store hours for 1000 some stores. Now, however, it seems what the ...
kenyabob's user avatar
  • 121
0 votes
0 answers
104 views

Deleted plugins still in database? (and reappearing in project.yaml)

I can see about 10 plugins in the craft_plugins table that have been long removed via the Craft CP panel, and removed from the composer files also. However when I enable project config, these deleted ...
James Greig's user avatar
0 votes
0 answers
2k views

Craft can’t connect to the database with the credentials in craft/config/db.php

I'm trying to upgrade from 2.7.10 to Craft 3. I follow the instructions/ docs to the letter, go to https://###.com/admin and am greeted with the above can't connect to database message. So far, I ...
deebie77's user avatar
0 votes
0 answers
393 views

Setting up Craft 3 database backup command for a remote database server

I have my Craft 3 database on a separate server than my Craft webserver (load balancing) and when I use the download database backup function in Craft 3, it doesn't know where to look. I haven't ...
Jay's user avatar
  • 1,042
0 votes
0 answers
112 views

amforms: Import form submissions from one site into another

Using Craft 2 and amforms, I created a massive form on a client's temporary site while working on the full refresh on a staging server. While that development's been going on, the live temp site has ...
Ryan's user avatar
  • 1,952
0 votes
0 answers
675 views

How to get GoDaddy to connect to db?

I've been trying to get a quick staging environment setup on GoDaddy all day. By using die('foo') I can tell that GoDaddy is able to reach all of my files (public/index.php, craft/config/db.php and ...
Steven Thate's user avatar
0 votes
0 answers
168 views

CDbException: Column not found

I created a Matrix field with 1 block type called "Logo" and 2 fields inside that: 1) a related entries field and 2) an image asset. I then created a global that has this Matrix field in it that ...
Ryan's user avatar
  • 1,952
0 votes
0 answers
80 views

Craft requires MySQL 5.1, got 5.1.73 and an error

I just moved my website on my production environment, and when I try to login, I get the "MySQL 5.1.0 is required..." So I did a phpinfo() and got Client API version 5.1.73 for MySQL. What did I do ...
ovesco's user avatar
  • 271