Closed (fixed)
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Experimental Widget
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2019 at 18:11 UTC
Updated:
1 Feb 2024 at 10:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
johnchqueWIP patch. Working now. No tests yet.
Comment #3
johnchqueNow checking the allowed values. Updating the ellipsis by the ellipsis char. Updating the labels of elements introduced here.
Comment #4
johnchqueSorry, some small adjustments. :)
Comment #5
johnchqueGot a problem when using the modal add form.
Comment #6
johnchqueMaking the target types an array so we can have multiple types returned from the conversion operation.
Comment #7
johnchqueSending the parent allowed types to the support method.
Comment #8
johnchqueUpdating patch to allow returning Paragraphs objects so we can reuse them.
Comment #9
mbovan commentedThis patch fixes a problem if a default language is not the first one in the list when doing conversions.
We noticed this in a client project and @Berdir fixed it so credits to him. :)
I have tried to create content + text paragraphs in one language and then switched it to the other language but I can't reproduce it...
Comment #10
mbovan commentedI thought that we are missing the alter hook so contrib/custom modules can alter converted paragraphs. It was just undocumented in
paragraphs.api.php. Fixed that and while here also fixed the code style errors I noticed.Comment #11
mbovan commentedParagraphsDemoTestchanges are not really related to this. Reverted that.Comment #12
mbovan commentedProviding a fix for the case when a conversion plugin doesn't return paragraph values but a paragraph entity.
Comment #13
mbovan commentedThis patch fixes an issue with the conversion hook that was not executed on each converted paragraphs.
Comment #14
mbovan commentedI updated
hook_paragraphs_conversion()to document that the hook is not fired for each translation.Comment #15
mbovan commentedI am providing a patch that improves
Drupal\paragraphs\ParagraphsConversionBase::supports()to it checks a user has create access to at least one target paragraph type.Comment #16
mbovan commentedJust noticed we already have this logic in two places in
Drupal\paragraphs\ParagraphsConversionManager. It has a bug as it doesn't set the flag toFALSEif a user has no create access.In #15, I moved the check into the base class so plugin implementations could decide whether they want to rely on access checks (best practice) or if they're doing something special. If we are enforcing the access check based on the plugin definition we should then move the similar check for the
source_typeinDrupal\paragraphs\ParagraphsConversionManagerIMHO.Comment #17
mbovan commentedHere I fixed the original problem described in #16.1.
Comment #18
primsi commentedSmall fix for the error described here #3082542: PHP notice when converting library item
Comment #19
berdirReroll.
Comment #20
berdirAnother reroll.
Comment #21
sasanikolic commentedI propose we add the small button class like we did for other buttons (for Claro) in https://www.drupal.org/node/3111075.
Comment #22
weseze commentedPatch #21 wasn't working for us against 1.13 release.
Attached is one that applies to 1.13. No changes
Comment #23
berdirThanks for the reroll. FWIW, I wasn't sure about committing this without getting some inputs about it from others. So if it's useful, let me know :)
Comment #26
berdirWe've been using this for years. Committed and created a basic documentation page: https://www.drupal.org/docs/contributed-modules/paragraphs/converting-pa...
Comment #27
pp.panatom commented@Berdir
on documentation page (also in related test),
function name `submitConversion()` should be `convert()`?