- ๐ฆ๐นAustria drupalfan2
Patch #89 does not work for 8.x-1.0-rc14 with Drupal 9.5.3 (it can be applied but it does not solve the problem).
I did not find any other patch or any other solution.
Does anyone have an idea how can I solve this?
Thx. - ๐ฆ๐นAustria drupalfan2
#93 solved:
"Allow user to make asymmetric translation" has to be activated on Manage Form Display of the conent type. - ๐ฉ๐ชGermany hchonov ๐ช๐บ๐ฉ๐ช๐ง๐ฌ
While testing this patch out I noticed that if the language of the content is changed this does not work quite well with referenced entities and sometimes their language gets changed as well or sometimes the entity remains in its original language and then differs from the one of the content after save ... We should not be assuming that we can simply change the language of the referenced entities since suddenly they might not get displayed in other places if they are reused. Instead, we should be translating them as this is the safe option. Worked on ๐ Main entity language change does not propagate to nested paragraphs in preview mode Needs review for adding support for propagating the language change and adding support in the patch here as well. I am not sure if this is the right issue though or if another is needed for this.
The last submitted patch, 95: 2822764-95.patch, failed testing. View results โ
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- ๐จ๐ดColombia waspper
There is a failing test about the same langcode for child entities. IMHO, it's not "valid", because this patch is in the way to allow having asymmetric content. I've removed some lines. Feel free to improve/blame :)
The last submitted patch, 97: 2822764-97.patch, failed testing. View results โ
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.The last submitted patch, 99: 2822764-99.patch, failed testing. View results โ
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs work
over 1 year ago 8:09am 19 July 2023 - @quadrexdev opened merge request.
- ๐บ๐ฆUkraine quadrexdev Lutsk
I've prepared a merge request to the 2.0.x-dev branch with an updated patch. For me it works well, appreciate it if anyone else could test it.
Also, attaching a file version of a patch in order to run some tests (cuz it seems for the 2.0.x-dev branch we have disabled tests running).
- last update
over 1 year ago 8 pass, 8 fail - last update
over 1 year ago Composer require failure - Status changed to Needs review
over 1 year ago 9:53am 19 July 2023 - last update
over 1 year ago Patch Failed to Apply - ๐บ๐ฆUkraine Goodmood
I'm still using rerolled patch from #90 (due to the same reason which mentioned there) over rc15 and D10.
With Drupal upgrade we have an exception when entity removed from ief widget and parent entity saved:
"Entity queries must explicitly set whether the query should be access checked or not"
This is because of absent accessCheck method on query in 'delete' method.
Added this check to patch from #90Also this should be added to patch #99 because otherwise it'll throw an exception on D10 as well.
- last update
about 1 year ago 8 pass, 8 fail I create a new patch for drupal 10.1.x, thanks for @quadrexdev, the #103 is useful for me. At the same time, I merged the patch in this issue Parent form entity builders run on IEF resulting in fatal errors ๐ Parent form entity builders run on IEF resulting in fatal errors Active into the new patch.
And I added the code for checking entity langcode and form langcode to get the corresponding entity.- ๐บ๐ธUnited States drupalevangelist Detroit, MI
I could not apply the #106 patch on Drupal 9.5.9 with PHP 8.1 on the 8.x-1.0-rc15 version. Was anyone able to use this patch cleanly?
- ๐ซ๐ทFrance JulienVey
Indeed the #106 patch is already based on the one you linked @drupalevangelist.
Here's the one that does not need any pre-patch :)
- ๐บ๐ธUnited States drupalevangelist Detroit, MI
Thank you! I was able to apply cleanly #111 patch on 8.x-1.0-rc15. But now I'm not encountering the following error when I try to create nodes using certain content types that has the Inline Entity Form widget configured:
Error: Call to a member function bundle() on null in Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection->stripAdminAndAnchorTagsFromResults() (line 289 of core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php).
- last update
about 1 year ago 2 pass, 14 fail - ๐ง๐ทBrazil adinancenci
111 did not worked on 1.0-rc15 so I made some slight alterations for anyone interested.
- last update
11 months ago 28 pass, 2 fail - last update
10 months ago PHPLint Failed - ๐ง๐ชBelgium Thomas Cys
Refactored patch because of failed tests in #114
- last update
10 months ago Patch Failed to Apply - last update
10 months ago 12 pass, 3 fail - last update
10 months ago Patch Failed to Apply - last update
10 months ago Patch Failed to Apply - ๐ฑ๐ปLatvia maijs
Adding refactored patch for the 3.x branch (c753ec1).
- The following code is reinstanted back to
InlineEntityFormComplex.php
file as removal of these caused namespace reference loss for existing code:use Drupal\Component\Utility\Tags; use Drupal\Core\Entity\Element\EntityAutocomplete;
- ๐ฑ๐ปLatvia maijs
Here's the follow-up update to the patch in #117.
- The following code is reinstanted back to
InlineEntityFormComplex.php
file as removal of these caused namespace reference loss for existing code:use Drupal\Component\Utility\Tags; use Drupal\Core\Entity\Element\EntityAutocomplete;
- ๐ณ๐ฑNetherlands joshahubbers
This is the patch is the same as #118, but rerolled for 3.x-rc19.
- last update
7 months ago 28 pass, 2 fail - ๐ฎ๐ณIndia sarvjeetsingh
The patch is same as #113, re--rolled it for 8.x-1.0-rc17
The last submitted patch, 120: 2822764-inline_entity_form-120.patch, failed testing. View results โ
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- ๐ง๐ชBelgium Robin.Houtevelts
robin.houtevelts โ made their first commit to this issueโs fork.
- Merge request !118#2822764: Support of asymmetric translations โ (Open) created by Robin.Houtevelts
- ๐ง๐ชBelgium Robin.Houtevelts
robin.houtevelts โ changed the visibility of the branch 3.x to hidden.
- First commit to issue fork.
- achap ๐ฆ๐บ
The latest commit of https://git.drupalcode.org/issue/inline_entity_form-2822764/-/tree/2822764-support-adding-new-entities-when-translating applies cleanly to 3.0.0-rc20 as a patch. I made a small change to remove
@label
from the translatable markup that was never actually getting replaced.The failing
TranslationTest
needs to be fixed and it seems to me that this patch has unintentionally changed the behavior even when allow asymmetric translations hasn't been enabled as the test fails on line 108 which is well before we enable it.// Both inline nodes should now be in English. $first_inline_node = $this->drupalGetNodeByTitle('Kann ein Kรยคnguru hรยถher als ein Haus springen?'); $second_inline_node = $this->drupalGetNodeByTitle('Can a kangaroo jump higher than a house?'); $this->assertSame('en', $first_inline_node->get('langcode')->value, 'The first inline entity has the correct langcode.'); $this->assertEquals('en', $second_inline_node->get('langcode')->value, 'The second inline entity has the correct langcode.');
#126
The website encountered an unexpected error. Try again later.
Error: Call to a member function isTranslatable() on null in Drupal\inline_entity_form\Form\EntityInlineForm->delete() (line 346 of modules/contrib/inline_entity_form/src/Form/EntityInlineForm.php).
Drupal\inline_entity_form\WidgetSubmit::doSubmit()
call_user_func_array() (Line: 113)
Drupal\inline_entity_form\ElementSubmit::doSubmit() (Line: 83)
Drupal\inline_entity_form\ElementSubmit::trigger()
call_user_func_array() (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 597)
Drupal\Core\Form\FormBuilder->processForm() (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult() (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)- achap ๐ฆ๐บ
Looks like this patch was on the right path from #95 and then veered away from it. I strongly agree with #95 that we should be translating entities rather than changing their langcode as that is destructive and would confuse editors. I believe the fix in #52 might have been trying to address that but it may be redundant now. Also, it only prevents deleting entities used by the parent node but that could mean they are still deleted if referenced by other entities. Heavily based this MR off #95.
Changes in MR 120:
1) Inline entities are translated rather than having their language changed.
2) Re-attached the submit handler from #95 that was removed and handled the case where the main entity form is submitted but the inline entity form hasn't been opened yet.
3) Removed the deletion code that was trying to prevent entities being removed if referenced by the parent entity (I think that is probably better handled by something like entity_reference_integrity module). See above for reasons.
4) Translations get their own created/updated timestamps when they are created rather than inheriting from the default translation. This helps them show up in the /admin/content view when the parent page is translated.
5) Rename the testTranslation test to testSymmetricTranslation and added cases for translations and timestamps. Also created a new testAsymmetricTranslation test to test asymmetric behaviors which was more thorough than the previous behaviour.Feedback welcome.
Regarding the comment in #127 the line number you indicated the error on doesn't match up with my MR so I don't think its related. Anyway I'm working on MR 120 now.