craftcms / craftcms/cms

[3.x]: INSERT INTO `resourcepaths` ... ON DUPLICATE KEY UPDATE error

Open
#11,404 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug craft3
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

What happened?
Description

I have a CraftCMS 3.7.44 staging site on a Fortrabbit 8.1 instance, where I have exported the database. I am now setting up a new local Nitro instance with the same repo.

When I run ./craft install everything works perfectly and I can access the CMS. But when I import my production database, I can't log into the CMS (spinner gif just spins for eternity) and I'm getting the following in my web.log: web.log

Steps to reproduce
  1. Set up new nitro local project
  2. Export the production DB
  3. Import the production DB into the nitro project
Expected behavior

The local version should be a working copy of the production DB site.

Actual behavior

Can't log into the CMS.

Craft CMS version

3.7.44

PHP version

8.0

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked web.log and comparing the database import flow with the successful ./craft install setup. Reproduce the issue with the stated Craft CMS 3.7.44, PHP 8.0, Nitro, and imported production database; done means the CMS login completes without the reported INSERT/ON DUPLICATE KEY error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, sql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.