Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving an entry after searching/filtering assets causes "Entry not found" error #5254

Closed
jordanmoore opened this issue Nov 20, 2019 · 7 comments

Comments

@jordanmoore
Copy link

@jordanmoore jordanmoore commented Nov 20, 2019

Description

This is happening in production and locally on the latest Craft install. Any time I want to create an entry or update an existing entry after searching for assets via the asset modal window, the entry fails to save.

Demo video

It may be worth mentioning that our assets are in Object Storage via Fortrabbit. Not sure if that's relevant to the issue. Also worth mentioning that it works fine when you don't search in the assets modal.

Steps to reproduce

  1. Click New Entry
  2. Search for an asset
  3. Click Save Entry

Additional info

  • Craft version: 3.3.15
  • PHP version: 7.3
  • Database driver & version: MySQL
  • Plugins & versions: AsyncQueue 2.0.0, Contact Form 2.2.5, Contact Form Extensions 1.2.0, Cookie Consent Banner 1.1.6, Copy 1.0.0-RC8, Entry Instructions 1.0.6, Feed Me 4.1.2, Position Fieldtype 1.0.14, Redactor 2.4.0, Redactor Custom Styles 3.0.2, SEO 3.6.2, Super Table 2.2.1, Tags 1.0.5, Wordsmith 3.0.5, fortrabbit Object Storage Volume 1.0.3.1
@brandonkelly

This comment has been minimized.

Copy link
Member

@brandonkelly brandonkelly commented Nov 21, 2019

I’m not able to reproduce this locally. Do me a favor…

  1. Create a new entry and select an asset without searching.
  2. In your JS console, run this:
    Craft.cp.$primaryForm.serialize().replace(/&/g, "\n")
  3. Copy the output to a text file
  4. Submit the form; verify that it saves successfully.
  5. Create a new entry and select the same asset after searching for it.
  6. In your JS console, run that same command again.
  7. Copy the output into a new text file.
  8. Email both text files to support@craftcms.com, indicating which is which and referencing this GitHub issue URL.
@jordanmoore

This comment has been minimized.

Copy link
Author

@jordanmoore jordanmoore commented Nov 22, 2019

Cheers Brandon. Email sent!

@LouisCuvelier

This comment has been minimized.

Copy link

@LouisCuvelier LouisCuvelier commented Dec 3, 2019

@brandonkelly I'm facing the same issue. But, to add a bit more context and maybe a clue to debug this, I identified something.

When I click "New entry", Craft add params to the URL, like this : /<id>/?draftId=<id>&fresh=<id>.
But, when I search an entry on an asset field or entry field, from the first character I type in the search bar, Craft removes the parameters from the URL, to only this /<id>/.

So without the params, when I save, It says "Entry not found".

@brandonkelly

This comment has been minimized.

Copy link
Member

@brandonkelly brandonkelly commented Dec 4, 2019

@LouisCuvelier Thanks, I just fixed that behavior (ff1186c). Not exactly sure how it would result in the Entry Not Found error, but can you please test to see if it resolves it?

To test, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#ff1186c974652e47be5bad88b68168b99da73f1f as 3.3.17",
  "...": "..."
}

Then run composer update.

@LouisCuvelier

This comment has been minimized.

Copy link

@LouisCuvelier LouisCuvelier commented Dec 4, 2019

It's working like a charm. Problem solved. Thanks @brandonkelly !

@jordanmoore

This comment has been minimized.

Copy link
Author

@jordanmoore jordanmoore commented Dec 4, 2019

Good catch @LouisCuvelier and thank you @brandonkelly, I can confirm the fix works for me also!

brandonkelly added a commit that referenced this issue Dec 5, 2019
@brandonkelly

This comment has been minimized.

Copy link
Member

@brandonkelly brandonkelly commented Dec 5, 2019

Great, thanks for checking @LouisCuvelier and @jordanmoore!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.