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

EE7.1 Deferred Relationships not working as expected #2297

Closed
litzinger opened this issue Aug 18, 2022 · 7 comments · Fixed by #2306, #2314 or #2321
Closed

EE7.1 Deferred Relationships not working as expected #2297

litzinger opened this issue Aug 18, 2022 · 7 comments · Fixed by #2306, #2314 or #2321

Comments

@litzinger
Copy link
Contributor

I'm not entirely sure this is working as expected. Below is a video of my CP page loading, and it's hard to tell exactly when the page render is done, but you can see "Edit Relationships" pop up for a quick second, then it turns into the "Relate Entry" button, but I had not clicked on "Edit Relationships" yet and the React field is immediately initialized.

Kapture.2022-08-18.at.13.32.17.mp4
@litzinger
Copy link
Contributor Author

litzinger commented Aug 19, 2022

I still don't see this working as expected. I updated to 7.1.1, cleared cache, and I tested in Safari and Chrome. Re-saved the field's settings so the deferred toggle is on, and the field always loads the React component immediately. The Edit Relationships button is never present.

@intoeetive
Copy link
Contributor

@litzinger This is how it worked in the original PR. However I think I know what has caused that, and I believe that's kind of "big typo" - block of the code that should not be there. Referenced commit should be fixing it.

@Yulyaswan please review, if all is good - then we need same change in the PR for 6.x #1882

@intoeetive intoeetive reopened this Aug 22, 2022
@intoeetive
Copy link
Contributor

@litzinger do not worry, we'll do that (and hopefully merge into 6.x soon)

@litzinger
Copy link
Contributor Author

Deleted last comment, I misread it and realized it wasn't addressed to me and got really confused. Sorry about that.

intoeetive added a commit that referenced this issue Aug 22, 2022
…ionships-EECORE-2102

Resolved #2297 where deferring relationship field was not working for fields with data
@litzinger
Copy link
Contributor Author

litzinger commented Aug 22, 2022

I just updated to 7.1.2, and I'm still seeing the same behavior. An existing entry with a field with an already assigned relationship immediately loads React instead of displaying the related entries and the Edit Relationships button. A field with no assigned entries, e.g. when creating a new entry, does show the Edit Relationships button.

@litzinger
Copy link
Contributor Author

If I remove the && empty($selected) in the conditional that was added recently I can see the field displaying on page load as expected. It shows a related entry, and the Edit Relationships button, but the React is still immediately taking over and making the field active without getting a chance to click on Edit Relationships.

@intoeetive
Copy link
Contributor

No idea how that happened ;(

The change was in f66c8b2 but did not make it through in the merge commit.

Thank you for bringing attention, we'll have this included (once again!) in 7.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment