- Issue created by @SamirMtl
- 🇺🇸United States mtalt Maryland
@SamirMtl Your fix does appear to fix the error. However, it appeared that it does not calculate the proper read time for the translated content. Are you experiencing that same issue?
- 🇺🇸United States kevinquillen
It may be because the langcode is not being passed to the view builder. Lets pass it along.
- Status changed to RTBC
over 1 year ago 5:58am 24 April 2023 - 🇮🇳India keshavv India
#3 Patch working fine. Reviewed the code and tested. I can confirm that, We can merge it. Moving to RTBC.
-
mtalt →
committed 17f551d3 on 1.0.x authored by
kevinquillen →
Issue #3345620 by kevinquillen, SamirMtl, keshav.k: Error on adding new...
-
mtalt →
committed 17f551d3 on 1.0.x authored by
kevinquillen →
- Status changed to Needs work
over 1 year ago 11:05pm 28 April 2023 - 🇺🇸United States mtalt Maryland
Thanks everyone! I've merged the patch from #3 in and created a new release for the module. I'm going to move this issue back to "Needs Work" because many people are still having issues when the Links field is displayed in the view mode. The error described in the issue still occurs when that Link field is displayed. I know a work-a-round is to create and use a new view mode that doesn't use the Links field, but it is causing too many headaches.
One of the previous solutions for the Links field issue was to split up the hooks into hook_entity_presave and hook_entity_insert. That resulted in node ID being available when rendering the Links field. Unfortunately, when a node is translatable, the issue still occurs when it tries to render the Links field when saving a translation. Using a similar solution for translations by using hook_entity_translation_insert didn't work for me and the error still occurred.
One thought would be to set the node's $is_in_preview value to TRUE before rendering the node. That should fix the issue because this part of the renderLinks method will never run, which is where the error is occurring.
Thoughts?
- 🇺🇸United States kevinquillen
After using that patch I never got the Links issue again, actually. Granted, the project I am on does not have translations.
- 🇺🇸United States mtalt Maryland
It was only occurring for me when it saves a translation. I really need to get tests added 📌 Add kernel tests Needs review for all these scenarios.
- 🇺🇸United States mtalt Maryland
A potential fix for the links field issue has been added in issue 3361590 🐛 Estimated Read Time module make webform send emails twice Fixed
- Status changed to Fixed
about 1 year ago 6:26pm 25 September 2023 - 🇺🇸United States mtalt Maryland
Marking this as fixed since the lingering link field issue should be resolved with the patch in 3361590 🐛 Estimated Read Time module make webform send emails twice Fixed being committed.
- 🇨🇦Canada SamirMtl
Hi @mtalt and @kevinquillenm, thank you for your valuable time on fixing this issue,
and sorry to not been more pro-active here ;) Automatically closed - issue fixed for 2 weeks with no activity.