Closed (fixed)
Project:
Paragraph View Mode
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Nov 2020 at 15:46 UTC
Updated:
26 Nov 2020 at 07:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
vacho commentedThis patch fixes the problem. Please review.
Comment #3
vacho commentedComment #4
sayco commentedI have reviewed your patch and seems like it's not chaning anything, the request service was already there... I suppose that your patch would rather validate something in the getViewModesFieldDescription() method, because it's possible that it won't find the paragraph type in the current request.
BTW I was working fine to me, I didn't have any errors. Could be more specific of how to reproduce the error?
What are the steps? Also please give me a specific Drupal version.
Comment #5
vacho commentedThe porblem happen if you go to
/admin/structure/paragraphs_type/<name_for_your_paragraph>/form-display(for a paragraph that has enabled paragraph_view_mode field)I have this problem with core 8.7.6 where the class
ParagraphViewModeWidgetwas not run the methodcreate(). So, at methodgetViewModesFieldDescription()the object can't get the$paragraphs_typeIt is the reason to the patch that's adds to this class
implements ContainerFactoryPluginInterfaceto can implement the object by create() method.I tested now the module with core 9.0.6 and this issue not happen. So I think we need to set the
core_version_requirementfrom^8 || ^9to^8.8 || ^9but I am unsure if the issue not happen at 8.8Also, we can apply this patch to get compatibility with old versions. Debatable...
Comment #6
sayco commentedThanks for more details, things become more clear to me now. It definitely seems to be the Drupal version issue. I did check with the 8.9, will verify on 8.8 tomorrow. I would rather stick to the latest or at least supported version of D core instead of keeping backward compatibility. Maybe it will be a good time to create a version 2, and add this compatibility to 1.x only
Comment #8
sayco commented