Questions tagged [database]

The tag has no usage guidance.

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

Why does the matrix field produce such a massive amount of duplicate information?

The matrix field in Craft CMS is producing massive quantities of duplicate data. About 70 database rows per entry. Is there something I'm doing wrong? I don't think this will be sustainable for my ...
1
vote
0answers
19 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 ...
0
votes
0answers
14 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. [...
2
votes
1answer
23 views

How to keep staging install synced with member registration

What is the best way to keep live and staging environments synced with member registrations? I can export/import the database from the live to staging environment to keep it in sync - and have a ...
1
vote
1answer
33 views

Use Emoji in Title?

I need to be able to store emoji in the title field of several entries, but whenever the entry is saved the emoji characters are stripped out and replaced with four question marks i.e. ????. I imagine ...
0
votes
0answers
17 views

Avoid Camel Case for S3 VolumeFolder

I have an S3 volume with a row in the volumefolders table that uses camel case. This is not appropriate for our S3 configuration. Can I just update the row to downcase the name and path? Is it ...
0
votes
0answers
17 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 ...
1
vote
3answers
37 views

Deleting user data from the database

I'm using Craft 3.6.4.1 and I need to delete a whole tranche of users from the database (that has derived from another Craft instance). I've been deleting by hand via the CMS but note that loads of ...
0
votes
0answers
16 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 ...
1
vote
1answer
32 views

New security key for existing database

I've been hunting through questions here, Discord, Craft docs for solutions for a boilerplate Craft CMS install. Because I want to include section & field configurations, I'm planning on importing ...
1
vote
1answer
40 views

Cannot connect to outside mssql database in production

Error: Craft CMS can’t connect to the database with the credentials in config/db.php. I have two database connections. One to mysql for the bulk of the website including all things craft, and one ...
1
vote
1answer
29 views

Craft CMS: Data too long for column 'cacheKey' at row 1

We have Craft CMS v3 using multi-sites. We are using cache to cache whole pages based on the absolute URL as some URLs have query parameters which seem to be ignored when not using a key. So the ...
2
votes
1answer
82 views

Is there a name for Craft 3's database model?

I find Craft 3 to have a very clever database structure which eschews all of the issues I've seen with EAV. Despite contrasting the differences between Craft 3's model and EAV, I'm having difficulty ...
1
vote
1answer
56 views

Database Exception Column not found: 1054 Unknown column 'configVersion' in 'field list'

I get this Error when i want to save a Field. Also when i want to create a new field. I can hit the goback button and strangely the field gets still saved. I work local and have project config ...
1
vote
3answers
89 views

How to delete old content in a Craft CMS database?

I've create 20+ websites in Craft and each time I've always started with the use of another site's database. (time saving to not have to create all fields, sections and more) On my latest site's ...
1
vote
1answer
110 views

Deleting Duplicate Fields Brings down Craft Website and Server

I have somehow managed to duplicate some fields in my Craft install (see image of unused fields). When I delete the unused duplicates I create a server error and can't access Craft. To rectify I had ...
0
votes
1answer
56 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 ...
0
votes
0answers
74 views

Database error when setting up Craft CMS with Composer

I have come across a problem when trying to install Craft CMS using composer. I'm hoping someone maybe able to help me out. I'm trying to install Craft CMS using composer for the first time. In the ...
1
vote
1answer
24 views

Trying to create a new field returns “General Error: 1030 Got error 1 from storage engine”

I recently updated the site to 3.5.5, so not sure if this has anything to do with it. It's been a while since the last field we created, so can not say for sure if this is correlated. Database on this ...
1
vote
1answer
34 views

Is this a basic error, or do I misunderstand how Craft queries the database?

I’ve been wrestling with a site from another developer (who will not be named). He seems to have a pretty solid grasp of PHP, and I had assumed that he also understood Craft well. However, as I ...
1
vote
1answer
41 views

How can I change the Date Created for Assets?

I'm using graphql to pull in some assets/pdfs and ordering them by dateCreated, however the files go back a few years (i.e. files from 2019, files from 2018 etc.) but they weren't uploaded in the ...
1
vote
1answer
112 views

Database backup fails

I'm building my Craft site locally, but need to make it live. When I go into Utilities -> Database Backup and try to create a backup, I get the error "There was a problem backing up your ...
1
vote
1answer
97 views

Get id of row inserted into database

I insert data into database table using query builder: $command = Craft::$app->db->createCommand()->insert('test2', array()); $command->execute(); How can i retrieve id of newly inserted ...
1
vote
1answer
49 views

Import / Aggregation DB - with 50 Million Records - Best Practice?

I'm working on my second Craft project ever. (First was an ultra-simple site just to learn the basics.) With this new project I need to accomplish 2 things... (1) - Private - Import/aggregate mass ...
0
votes
0answers
33 views

How to clean unused fields from the database?

Having the exact same question as How to clear the database of unused fields? but with Craft 3. The question in the other thread is made 6 years ago and obviously not about craft 3. So how's the ...
0
votes
0answers
36 views

Craft CMS Multisites with 100++ Sites

We're lookin for someone having experience with having A LOT OF MULTISITES in a Craft CMS installation? A project of ours has currently 68 Multisites, but approx. 50 more to come. We're looking for ...
1
vote
2answers
86 views

Problems transferring updates back to live server

For quite a long time i've updated and amended Craft by taking a copy of the files and database (.zip) from the live server, making the updates/changes/amendments locally and then transferring ...
1
vote
1answer
196 views

SQLite database support

Is there any plan on supporting SQLite someday? It would be very interesting for small instances where we can't create any MySQL or MariaDB databases for example (in my case, free tier hosting coming ...
1
vote
1answer
81 views

How to create an entry with MySQL?

I'm trying to create a new entry from within the database. The section is defined in craft_sections, and the entries for craft_elements, and craft_entries seem correct after the script is run, but no ...
1
vote
1answer
37 views

Click counter for links (craft v2)

So I'm new to PHP and ok with Javascript. I have a page on my site with a long list of external links, would it be possible to add a counter to be displayed next to each link that shows how many times ...
1
vote
1answer
267 views

AWS EC2, Load Balancer and Updating Craft

I have a pretty large Craft site that needs to be load balanced with multiple ec2 instances and one RDS mysql instance. Everything is working great, except for I noticed that if I get to the admin ...
1
vote
1answer
402 views

Database Exception: Column not found: 1054 Unknown column 'position' in 'order clause'

I deployed the project from the git repository on hosting. When trying to open the homepage I get the following error: Database Exception SQLSTATE[42S22]: Column not found: 1054 Unknown column '...
1
vote
1answer
87 views

Entry Search Unbearably Slow

Anyone have any tips on speeding up entry searches? Ours are currently taking about 90 seconds per search. Some stats about our Craft database: Entries: 336,000 Relations: 4,390,000 (!!!) Search ...
1
vote
1answer
145 views

Craft CMS 3 - Manual database backup

Since my hosting provider is blocking mysqldump on its server, I'm trying to do a manual backup of my database in order to import the DB into my test environment. I'm stuck on the elements to ignore ...
1
vote
2answers
52 views

Querying across relationships in a template

I have two Sections on my site: Country and Alert. The Alert section has a relation with Country via an "Entries" field. An Alert represents something that is happening in a particular country for a ...
1
vote
1answer
63 views

How to host a huge website on Craft (10k pages, over a dozen languages, 2GB database)

We have what appears to be a very large website. We have a strong content strategy which has led us to develop a huge number of pages (over 10k) for our website, as well as building out a significant ...
0
votes
0answers
36 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 ...
2
votes
1answer
256 views

Can't backup DB locally with MAMP PRO 5.5.1

I have followed the instructions for this article (https://craftcms.com/guides/database-backups-in-craft-3-with-mamp) to get local backups working with MAMP. However, when I attempt a backup, I get ...
2
votes
1answer
137 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
79 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
1k 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 ...
1
vote
1answer
37 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
81 views

Why is this Twig code generating large numbers of DB queries?

I have a Twig include that generates a News Archive side-bar. It works great, but I've just noticed that on a particular project it's contributing in the region of 800 DB Queries when caching is off. ...
1
vote
1answer
41 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 \ ...
1
vote
1answer
237 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
104 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 ...
1
vote
1answer
122 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 ...
1
vote
1answer
527 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 I want to save data from the form in Craft CMS. How to save data from user frontend to backend on Craft CMS?
1
vote
0answers
26 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
324 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
2 3 4 5
7