| Comment | File | Size | Author |
|---|---|---|---|
| Selection_200.png | 48.71 KB | chrissnyder | |
| #22 | diff.txt | 2.93 KB | davidwbarratt |
| #22 | copied-field-does-not-have-widget-field-settings-2822398-22.patch | 2.45 KB | davidwbarratt |
| Comment | File | Size | Author |
|---|---|---|---|
| Selection_200.png | 48.71 KB | chrissnyder | |
| #22 | diff.txt | 2.93 KB | davidwbarratt |
| #22 | copied-field-does-not-have-widget-field-settings-2822398-22.patch | 2.45 KB | davidwbarratt |
Comments
Comment #2
jacobfrancke@gmail.com commented+1
Comment #3
thiagomoraesp commented+1
Comment #4
kriboogh commentedThe summary function is missing, which is needed to display the form.
I'll try to cook up a patch, but in the mean time just add this method to DisplayFieldCopy.php
Comment #5
kriboogh commentedTo make this work properly this also needs a patch for ds in the file field_ui.inc at line 1117.
Patch is coming up just need the time to make it.
Comment #6
kriboogh commentedHere is the patch
Comment #7
kriboogh commentedExtra fix, apparently the prepareView isn't called before the elements are handled.
Comment #8
tipit commentedI cant't apply the patch against the 1.0 release.
Why is it made for alpha3 version (like it says in the version)?
Comment #9
davidwbarratt commentedComment #10
arunkumarkHi,
I have rerolled the patch for the latest version of Display Field Copy module.
Comment #11
tipit commented#10 Works. Thank you!
However I get a Notice [1] on node display page (admin/structure/types/manage/event/display) if the Field copy is not placed on the layout. Meaning it is disabled.
[1] Notice: Undefined index: formatter in Drupal\display_field_copy\Plugin\DsField\DisplayFieldCopy->settingsSummary() (line 134 of modules/contrib/display_field_copy/src/Plugin/DsField/DisplayFieldCopy.php).
Drupal\display_field_copy\Plugin\DsField\DisplayFieldCopy->settingsSummary(Array) (Line: 631)
ds_field_settings_summary(Object, Array, Object) (Line: 1248)
_ds_field_ui_fields('node', 'event', 'default', Array, Object) (Line: 46)
ds_field_ui_fields_layouts(Array, Object) (Line: 247)
ds_form_entity_view_display_edit_form_alter(Array, Object, 'entity_view_display_edit_form') (Line: 501)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'entity_view_display_edit_form') (Line: 819)
Drupal\Core\Form\FormBuilder->prepareForm('entity_view_display_edit_form', Array, Object) (Line: 272)
Drupal\Core\Form\FormBuilder->buildForm('entity_view_display_edit_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Undefined index: formatter in Drupal\display_field_copy\Plugin\DsField\DisplayFieldCopy->settingsSummary() (line 134 of modules/contrib/display_field_copy/src/Plugin/DsField/DisplayFieldCopy.php).
Drupal\display_field_copy\Plugin\DsField\DisplayFieldCopy->settingsSummary(Array) (Line: 631)
ds_field_settings_summary(Object, Array, Object) (Line: 1248)
_ds_field_ui_fields('node', 'event', 'default', Array, Object) (Line: 46)
ds_field_ui_fields_layouts(Array, Object) (Line: 247)
ds_form_entity_view_display_edit_form_alter(Array, Object, 'entity_view_display_edit_form') (Line: 501)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'entity_view_display_edit_form') (Line: 819)
Drupal\Core\Form\FormBuilder->prepareForm('entity_view_display_edit_form', Array, Object) (Line: 272)
Drupal\Core\Form\FormBuilder->buildForm('entity_view_display_edit_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment #12
tipit commentedComment #13
tipit commentedComment #14
tipit commentedComment #15
davidwbarratt commentedThe notice has to be fixed.
Comment #16
arunkumark@TipiT can you share the Drupal core version you are using?
Comment #17
diegopino commentedHi, the issue reported by @TipiT on applying the provided patch still persists. Problem is related to the fact that Disabled fields do not store configurations (they are basically removed from a Display, which means 'formatter' key simply does not exist at field level). The following patch applies cleanly over 8.x-1.x .
Side note: because the way Ds handles the Display field list form (and the fact that settings totally depend on having a Summary present) , if you move a field from enabled to disabled, save and then you move it back to enabled, expected behavior on setting a formatter widget is a bit confusing. You have to save the changes to current display before the Widget settings appear again. Let me know if this fixes the current issue and maybe we could add a more informative message (Somewhere?) about this on the UI on a separate one or directly on Ds.
I also did a minor change in the class definition. It feels more portable if the class implements directly
DsFieldInterfaceInterface instead of cherry-picking only the container injection piece which is also included in DsFieldInterface. That way this field can be used every-time a DsField Interface is expected.(My first Drupal contribution, so please forgive any mistakes in the workflow)
Comment #18
kriboogh commentedKicking the testbot.
Comment #19
kriboogh commentedah,.. no testbot, but still needs review :-)
Comment #20
diegopino commentedHi @davidwbarratt, if you have some time, could you please give this patch a review? Thanks
Comment #21
henrijs.seso commentedPatch #17 works IRL
Comment #22
davidwbarratt commentedI made a few formatting changes, please retest. :)
Comment #23
diegopino commentedHi @davidwbarratt, thanks! looks good. Thanks for the corrections.
Comment #24
diegopino commentedAny change this getting merged soon?
Thanks
Comment #26
davidwbarratt commentedComment #27
diegopino commented@davidwbarratt thank you!