Questions tagged [database]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

Best practice for multi site development, staging, etc. [Special snowflake details inside]

The story: Site A is running in Craft 3 as the primary site. (On a subdomain, if that matters.) Sites B and C are running in ExpressionEngine 2. I need to write new HTML/CSS for sites B & C. I ...
1
vote
1answer
9 views

Restoring a database results in error

I downloaded a database backup from the craft back-end. I've tried to restore it via PHPMyAdmin and MySQL workbench, and I get the following errors: ERROR 1227 (42000) at line 18: Access denied; you ...
0
votes
0answers
31 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://groomarts.com/admin and am greeted with the above can't connect to database message. So far,...
1
vote
1answer
16 views

Field removed from entry layout is still displaying

So I'm setting my meta author tag this way: <meta name="author" content="{% if seoAuthor is defined %}{{seoAuthor}}{% else %}{{globalSeo.seoAuthor}}{% endif %}"> seoAuthor is a field that ...
1
vote
1answer
17 views

Store phonetics in plain text field

I need to store phonetics for word definitions in a plain text field. An example would be something like "Craft Website" => \ ˈkraft ˈweb-ˌsīt \, like you'd see in a dictionary. If I try saving \ ...
0
votes
0answers
18 views

Database Exception – yii\db\Exception

I created a plaintext field called 'researchYear' that was add to a section called 'research'. I added a record to the section. I went back to the field, renamed it to 'researchDate' and made it a ...
1
vote
1answer
36 views

How do I set up Craft 3 to web server in WAMP?

I'm very new to Craft CMS, and I certainly love this concept! However, I keep trying to run it locally onto my computer following the documentation here https://docs.craftcms.com/v3/installation.html ...
1
vote
2answers
38 views

In a plugin, how to get entry status?

This seems like it should be simple to find, but where does Craft store the status of entries (lightswitch for enabled/disabled)? It doesn't seem to be a column in the entries table, and I can't ...
0
votes
0answers
16 views

When doing dry-runs of a Craft 2-3 migration, why don't plugin migrations run on fresh databases?

I've been working on migrating our site from Craft 2 to Craft 3 and even our business logic plugin seems to be running well. In order to be sure that we have all the steps needed to get our testing/...
1
vote
1answer
14 views

ERROR: relation “assetindexdata_id_seq” already exists on new database

I'm using PostgreSQL locally and everything is working as expected. However, when I decided to move/restore the database to the staging environment I am getting this error (even through the tables do ...
0
votes
0answers
30 views

How save data from form in headless Craft via Vue.js

I have front-end form on Vue.js and Craft CMS for the backend. I need form. And data from form I must save in Craft CNS. How to save data from user frontend to backend on Craft CMS?
0
votes
0answers
29 views

Database level fix for corrupted Structure section generating “unknown errors”

This is a partial duplicate of a direct support request raised through email. I have 2 Structure sections that have been behaving just fine in Craft 3.1.32.1: One of them continues to be fine But ...
1
vote
0answers
18 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 ...
1
vote
1answer
47 views

Can't Backup Database - “Failed with exit code 1” (WAMP Server)

I'm running Craft 3 on a local windows machine, but every time I try to update certain plugins (or Craft itself) I get a message "Couldn't back up the database. How would you like to proceed". The ...
1
vote
1answer
32 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 ...
1
vote
1answer
13 views

some assets have volumeId set to NULL in database

I noticed that some of my assets have volemeId column set to NULL in the database table assets. Is it normal? Should I attach them manually to some volume?
0
votes
0answers
17 views

Possible to move matrix content from one global set to another

Is it possible within the database to manipulate a couple of keys to move matrix content to another global set without having to re-enter it all in Craft 3? I have the matrix field in both global ...
1
vote
2answers
199 views

Craft “Unsupported DB driver” error after resetting Windows

I'm using WinNMP for my local dev environment. I installed and configured everything successfully last week, and everything was running well. Unfortunately, I needed to reset my windows installation ...
1
vote
1answer
71 views

Assets Error: Unknown or bad format (years) at position 0 (y)

I am getting a new error, after no apparent updates from me or the client. The error only appears on pages with this one particular field. "DateInterval::createFromDateString(): Unknown or bad ...
1
vote
1answer
88 views

Migrating Server - Craft isn't installed yet

I've set up a new Forge server and connected the repo to my site. I've also uploaded the database and copied over the db credentials to the dotenv file. However when I visit the site control panel ...
1
vote
0answers
37 views

Should project config be used during development when migrating from Craft 2?

I'm looking for general advice on the best approach to handle a reasonable sized Craft 2 site to Craft 3.1, related to DB changes. Because the Craft 2 project is live and constantly changing, I ...
1
vote
1answer
70 views

Can't login after restoring production DB locally

I'm attempting to restore a postgres DB backup on to my local dev environment but I encounter an error when trying to login as the admin user (the salient parts being): SQLSTATE[23502]: Not null ...
1
vote
1answer
138 views

How do I import database using the CMS Craft 3

We have previously used the Schematic plugin for database import inside a Docker container for a Python script. This is the command used for the importing, $/data/craft/craft schematic/export --file=...
1
vote
1answer
104 views

Install Failed - Numerous Errors when running with pgsql

Getting Numerous errors when trying to test a staging environment with Craft 3.1. States Install Failed - Check Logs which I have and I'm seeing the following logs being given. I don't understand what'...
1
vote
1answer
240 views

What is CDbException Error: SQLSTATE[42000]: Syntax error or access violation while moving a site to remote?

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #28 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'site....
1
vote
1answer
93 views

MySQL “Access denied for user” after moving to new server

I've moved my Craft 3 installation to a new server. When connecting to the original database, everything works fine. However, when trying to connect to a new MySQL database (I've tried hosting this ...
2
votes
0answers
72 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. ...
1
vote
1answer
74 views

Setting Up Multiple Sites

I've tried following the guide for setting up multiple sites (https://docs.craftcms.com/v3/sites.html#creating-a-site) but I think i'm missing something. Firstly the craft install on your beta site, ...
2
votes
2answers
380 views

“Craft CMS does not support backtracking to this version. Please upload Craft CMS 0 or later.”

I have a problem related this and this question. I began updating a long time ago (2017?) and got the error "Craft CMS does not support backtracking to this version. Please upload Craft CMS 0 or later"...
1
vote
1answer
42 views

Craft 2, MySQL database, Twig, JavaScript files

I have created in Craft 2 CMS, under the profile of users (ex. parents), new tab for (children), where parents can fill in there children information. The data is saved in a database under the ...
1
vote
1answer
44 views

Craft CMS 3 Content Mover

My database was corrupted after updating to 3.1.0 and no backup. Is there any script to move fields, sections and other staff to new fresh database? Update I found something like this scripts, but ...
1
vote
2answers
103 views

Unable to access site after importing DB

I am installing a repo locally, and everything runs smoothly and I am able to see the site and login to my admin. But when I import my DB then visit my site: I get the error message "Site unavailable"....
1
vote
1answer
232 views

How to connect to a Remote DB using CraftCMS 3.1+

I tried using Andrew Welch's craft-connect plugin, but the plugin was throwing an error on the REMOTE_DB_SERVER variable. I commented the variable out in the .env file, but I still could not connect. ...
1
vote
1answer
44 views

Connect to an external database from a Craft 2.x plugin

I recently saw a very helpful post about how to connect to an external database from a Craft plugin and I wanted to confirm I understood the implementation correctly. On this response the author ...
1
vote
2answers
199 views

Import database backup when using docker

I am trying to import a database backup into a craft instance running on Docker, but none of the fields or content from the latest backup are importing. Here are the steps I took I used these ...
1
vote
2answers
167 views

Accessing Multiple Databases in Craft

Is there a way to access another database outside of the one Craft uses for its content? I need to able to access data fields from an external source for a project I'm working on.
1
vote
2answers
52 views

How do I update a Craft website without losing data?

I have an existing website built with Craft CMS. I made a few changes locally and now I want to update the 'live' website. The problem is that I added a couple of fields and sections but I can't just ...
2
votes
1answer
239 views

Working locally after cloning Craft 3 from Hyperlane

I'm trying out the recommended Hyperlane hosting with Craft CMS. After installing on Hyperlane, I then clone the repo on to my local machine and run 'composer install'. That runs fine, and I create a ....
0
votes
1answer
104 views

Does Craft ActiveRecord require any special table column (dateUpdated, dateCreated,…)?

I have a custom data table PA in the Craft database. I create a craft\db\ActiveRecord model and I want load() and save() data to it. The result will be custom GridView table with CRUD in front end ...
1
vote
2answers
29 views

Counting section handle in TWIG with weighted search plugin

I am using the weighted search plugin to inplement a search functionality in my site. It works as it should but I am looking for a way to tell how much results were found of each type. Where type for ...
1
vote
1answer
70 views

Advanced sorting of events with database expressions (Solspace Calendar)

I want to do some complicated sorting of events coming back from the Solspace Calendar plugin. I'm not certain whether this issue is specific to this plugin or whether it's a general Craft thing. In ...
0
votes
0answers
191 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 ...
2
votes
1answer
99 views

Showing entries for light switch [duplicate]

So I have three light switches on my blog: 'featured', 'required reading' and 'skills'. I got the featured section to work with this code: {% for entry in craft.entries .section(['etiquette', '...
3
votes
1answer
220 views

Craft version number in database?

My provider upgraded to PHP7 and deleted all files outside of the public folder, where I had the system files (...). Is it possible to find out from the database which version (of Craft 2) I need to ...
1
vote
3answers
513 views

Craft 3 cannot find mysqldump command, console works

I want to use Feed Me with Craft to import my old database, but neither Feed Me nor Craft can find mysqldump. I know this is a known problem, and I have successfully added the path to $PATH and ...
1
vote
1answer
414 views

Randomly getting the “Integrity constraint violation” sql error on saving entry

Randomly getting the "Integrity constraint violation" sql error on saving entry from backend. There no apparent cause of this at least not that I can see, because the same post saves without errors ...
1
vote
0answers
112 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 ...
2
votes
1answer
66 views

Managing sections and field updates between environments

What is the best practice for the following: Client site running CraftCMS (v3) is in production. Updates are needed which require additions or modifications to the data structure / schema of the site ...
1
vote
0answers
232 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 /...
1
vote
1answer
346 views

Problem connecting to MySQL db on installing Craft 3

Having installed Craft 3 using Composer, I'm attempting to run the Craft setup. Everytime I try, I get the following error: Testing database credentials... failed: SQLSTATE[HY000] [1044] Access ...