Great! Thank you ankitv18. I will release it as soon as ci tests that are running now pass.
aleix → created an issue. See original summary → .
Hi, I just created a MR ... It's about the same thing but is done using the core Actions API with a derivative that could be executed from any view. So I think it's easier because with any terms view it could be called.
It may be used this in a new view with `/admin/structure/taxonomy/manage/%taxonomy_vocabulary/merge_terms` path that is restricted to a one defined vocabulary.
I see, there are some issues with configurations...i'll take a look asap. thank's for reporting.
Sure, it sounds good to me, as soon as I can work on it I'll take a look.
Excuse the necrobump, not exactly what is looking for, but I want to be disabled if no query has been made, so it could be based on this to disable if no results.
So just for future references setting a flag like:
function yourtheme_preprocess_search_api_sorts_sort(&$variables) {
$variables["searching"] = !empty(\Drupal::request()->query->all());
}
make it possible to wrap sorts links in template search-api-sorts-sort.html.twig
{% if searching %}
<button ...>
{% endif %}
Hi, i face the same issue. It's on ckeditor plugins side, and the bad news is that it will not work by now neither with 10.4 nor with what's been doing in 11.x by now, as the maximum version ckeditor used is 42.0.0 by now . To be aware of which version is using drupal, there's this file that could be checked on each drupal version in https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/ckedi...
X.com and Reels embedding functionalities are merged in ckeditor 43.1.0 : https://github.com/ckeditor/ckeditor5/commits/v43.1.0/packages/ckeditor5...
Youtube shorts embedding functionalities are merged in ckeditor 43.2.0 : https://github.com/ckeditor/ckeditor5/blob/v43.2.0/packages/ckeditor5-me...
So if you need these embedding features you'll need to cherry pick the commits and rebuild the package. There's some guidance of how can be done in
https://www.drupal.org/docs/core-modules-and-themes/core-modules/ckedito... →
What I've done is:
git clone https://github.com/ckeditor/ckeditor5.git
cd ckeditor5
#lookup for the version of ckeditor packed in your drupal (you could check in site report page or in /core/modules/ckeditor5/js/build/ckeditor5.types.jsdoc );
#for 10.3.x : 41.3.1
#for 10.4.x : 42.0.0
#checkout the tag matching the version.
git checkout tags/v41.3.1
# lookup for commit hashes (that's pickable) https://github.com/ckeditor/ckeditor5/commits/v43.3.0/packages/ckeditor5-media-embed/src/mediaembedediting.ts
# for x.com and reels:
git cherry-pick 6cd9dc30089116f7481ce52b067245eb2e8678bf
# for youtube shorts:
git cherry-pick bba1f7f59ce887c08d107a11bf1124363a358de4
yarn install
yarn dll:build
After building, replacing at least the build
in web/libraries/media-embed/
with the one just built in packages/ckeditor5-media-embed
will enable the embedding of these providers.
I found the same when it was half installed because faulty php settings, timeout or so. This must not happen when using "drush en", I suspect that the problem here is not in commerce module but in server environment, so it's a support request rather than a commerce issue.
Anyway, I need to reinstall the 'cart' field definition existing in commerce_cart_entity_base_field_info , using the method:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
To call this, one can call it just before the uninstallFieldStorageDefinition called in core/lib/Drupal/Core/Extension/ModuleInstaller.php:497 uninstall method:
+$update_manager->uninstallFieldStorageDefinition('cart', $entity_type->id(), 'commerce_cart, $storage_definition);
$update_manager->uninstallFieldStorageDefinition($storage_definition);
If trying to reinstall commerce_cart complains about existing core.entity_view_mode.commerce_product_attribute_value.add_to_cart, then the conf may need to be deleted (drush cdel can do it)
Thank's, yes maybe css could be simplified (but little example about how to add scss to components may illustrate someone).
After trying to integrate the feature request in previous comment I end up creating a module with simplified behavior: a simple checkbox to relate the referenced entities if possible it could be found here: https://www.drupal.org/project/group_relationship_inheritance → , sorry for the noise guys.
Sorry to necrobumping this, but I think that there's a use case: Imagine a course group that has chapters and resources as group content, resources are created in chapters through inline entity form, but they need to be added to group too. So a clean way may be to add entitygroupfield prepopulated from ief form alter getting the route parameters. Now is so difficult to reach there from form alter, so the same way the form element has 'excluded_groups' it could have the 'preselected_groups' element property.
This use case is also there when there are references to media in group content that must be confined to group it's commonly desired to inherit the group relationship from parent content.
@john-frnklin I am sorry but I am on vacation now, in September I'll start a commerce implementation in a working site, I'll check it out then. I keep the mail notification flagged to keep in mind.
Thank's @doxigo , much better now. so now I can use title_attributes: title_attributes
in node templates
@berdir as a maintainer of both modules, I imagine that there will be things that I miss, but anyway it's a start, I can use entitybrowser with err with this fieldwidgets plugin that mimics what is done in err widget plugin extended class.
Sure, thanks for contributing. I merged it, but also namespacing de dependency as in https://www.drupal.org/docs/develop/creating-modules/let-drupal-know-abo... →
I am just testing but just adding
starterkit: true
to https://git.drupalcode.org/project/ui_suite_bootstrap/-/blob/5.0.x/start... lets me run
php web/core/scripts/drupal generate-theme --starterkit ui_suite_bootstrap_subtheme_example mytheme
Just reporting that without the 'to' sendgrid transport that comes with symfony_mailer cannot work.
The to array is required for all personalization objects, and must have at least one email object with a valid email address.
`http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#messa...`
Finally passing, waiting for review now.
As the tests in ci are failing... I'll check asap
(adding minor commit to patch for composer)
(patch for composer purposes)
After adding the conditional, tests confirm that tickets Field tickets is unknown
errors are not there anymore :) .
Adding critical as this issue breaks some sites that are mixing orders with enabled and disabled tickets...
In fact it doesn't affect only the assign event, it will affect the events without the conditional that checks if order entity hasn't the tickets field. The test in MR shows just the assign and paid event. But It's clear that the subscription will affect orders without tickets enabled, and testing all events will add noise to test files.
Gracias pedro, Do you think you could review proposed patches or just the ones RTBC? I have it working on production so maybe I could help with main features (in fact I proposed these by now). Namely:
- Theming capabilities.
- Symfony mailer support.
- Fix the sending in some contexts.
As you said somewhere maybe a new release could help. That said maybe someone in this issue could join the efforts to keep this module with a clear future (or claim for help in main commerce module...)
BTW @pcambra i am also aleix in drupal.cat tg group if you want to talk about it.
It's like a support answer than something relevant on this issue. I hope it helps, however it's not the place, as If we start a conversation about the module patches in and out the noise will be too high to help the maintainers decide about issue resolution, This kind of support conversation is better in a support issue, or by mail or matrix. But as maintainers are too busy, I understand that you could feel a little lost so,... A D10 dev branch would be really appreciated to address the community efforts made to improve this module... here it is my answer:
Yes, I have it working as it should, setting branch to 3382034-drupal-10-upgrade . And patching with:
"Theming commerce_ticket entity view modes(not pdf)": "https://www.drupal.org/files/issues/2023-01-17/theming-3415300-4.patch",
"Tickets not autoactivating and so not sent when using stripe payment": "https://www.drupal.org/files/issues/2024-01-19/autoactivating-3415783-7.patch",
"Tickets pdfs not sending in active frontend theme": "patches/commerce-ticketing-entity_print_active_theme.patch",
And:
"drupal/entity_print": {
"3383187 - Unexpected Error, Session has not been set": "https://www.drupal.org/files/issues/2023-12-06/3383187-5.patch"
},
You could check it out, Maybe I miss something, as time passes it will be harder to recall what are the pieces to glue in this module to make it work with D10.
Just added kernel tests for the translated nodes that references terms to be merged.
- Drupal\Tests\term_reference_change\Kernel\ReferenceTranslatedFinderTest::findsReferencingEntities
- Drupal\Tests\term_reference_change\Kernel\ReferenceTranslatedFinderTest::migrateTranslatedReferencingEntitiesSingle
- Drupal\Tests\term_reference_change\Kernel\ReferenceTranslatedFinderTest::migrateTranslatedReferencingEntities"original has synonyms"
- Drupal\Tests\term_reference_change\Kernel\ReferenceTranslatedFinderTest::migrateTranslatedReferencingEntities"translated has synonyms"
- Drupal\Tests\term_reference_change\Kernel\ReferenceTranslatedFinderTest::migrateTranslatedReferencingEntities"both have synonyms"
- Drupal\Tests\term_reference_change\Kernel\ReferenceTranslatedFinderTest::migrateTranslatedReferencingEntities"no synonyms"
The migrateTranslatedReferencingEntities test is a little overkill and may be hard to understand because the logics to accept dataprovider, but it also helps to be sure that things are working in most of the scenarios.
The migrateTranslatedReferencingEntitiesSingle test is the same but limited to one scenario.
The findsReferencingEntities just find the referencing entities with terms to be merged.
All have passed in local, let's see here. So it could be reviewed.
@mgstables
If using symfony mailer, the use of the plugin proposed in
https://www.drupal.org/project/commerce_ticketing/issues/3416185
✨
Symfony mailer plugin
Needs review
helps in creating the pdf with the active theme. Take care that it is waiting to be reviewed
Great! Thank's.
I am just writing to let you know that your tips worked and plugin is much cleaner right now. I hope that it will be merged.
I have updated the plugin following @Adamps recommendations.
aleix → changed the visibility of the branch 3420247-uncaught-typeerror-once to hidden.
Thank's @msnassar , Yes! looks promising, nice work! kudos for your contribution. (btw are you planning to request merging it with group media?)
For my use case, I need a basic functionality of media library by now, but I think that if a project requires something more powerful, it will require the use of your modules ( Or going to entity browser).
But anyway, the docs of this module also needs to be there and matching the use case of nowadays group module requirements.
Again, thank's for spending all the time coding there!
I have it working with D10. If you need something to be checked more in depth I could test asap.
Adding the test to be reviewed.
To pass as it should it needs the included view like the one in MR of https://www.drupal.org/project/group_term/issues/3418042 💬 Groups content form available tags Needs review may help (it needs also the default argument plugin included in the MR too: https://git.drupaxlcode.org/issue/group_term-3418042/-/commit/7f7ea9f264... ).
Also, it needs some way to alter the form that includes the term reference field, to add a dynamic argument to the view(something like): https://www.drupal.org/project/group_term/issues/3418042#comment-15425010 💬 Groups content form available tags Needs review , to let find the related group based on node membership (e.g. useful when using node edit form for a node previously related to a group).For example to alter the node page forms:
/**
* Restrict the terms on group documents to restrict per group only terms.
*
*/
function group_term_overrides_form_alter(&$form, FormStateInterface $form_state, $form_id){
if ($form_id == 'node_page_edit_form' || $form_id == 'node_page_form') {
$groups = [];
$group = \Drupal::request()->attributes->get('group');
if (empty($group) || !$group instanceof Group) {
$node = \Drupal::request()->attributes->get('node');
if (!empty($node) && $node instanceof Node) {
foreach (GroupRelationship::loadByEntity($node) as $group_relationships) {
// If it's linked to more than one then it will grab the group
// entity->id of the last linked group only so push to groups array
$group_id = $group_relationships->gid->entity->id();
$groups[] = Group::load($group_id);
}
}
} else {
$groups[] = $group;
}
if(!empty($groups)) {
// JUST USE the First group found here! No cardinality support.
if ($groups[0] instanceof Group) {
$form['field_group_tags']['widget'][0]['target_id']['#selection_settings']['view']['arguments'][0] = $groups[0]->id();
}
}
}
}
When above changes are included, It will show how:
A view makes possible to filter the terms based on group, as shown in test: testTermInsideGroupAutocomplete . Despite it has some issues too, as in https://git.drupalcode.org/issue/group_term-3419691/-/blame/0a6ddc639222... , where is not possible to use directly the group permission access. Also, despite it will add the basic functionality, it's restricted to autocomplete, as I find no way to get the options when rendering the form (as shown in https://git.drupalcode.org/issue/group_term-3419691/-/blame/0a6ddc639222... ) .
The tests will check terms listing, isolation between groups, isolation between group scope and outside of group scope. Basic term creation, and basic operations check.
So to conclude I find it possible to make it work the module for my basic use case, but to get a step further I think that It may need a dedicated field widget component or use something like entity browser to pick up the terms.
As I used this view as origin of available tags, I found that entityreference view could not set dynamically the argument.
here it works setting the argument with an alter hook to finally provide :
...
$form['field_tags']['widget'][0]['target_id']['#selection_settings']['view']['arguments'][0] = $groups[0]->id();
...
Note that media library checks itself in Drupal\media_library\MediaLibraryUiBuilder::checkAccess that user has 'view media' permission and also that has createAccess of bundle that has opened the media library.
So, despite the aparently fine forbid of "Create article content" in /admin/people/permissions
and allow of "Entity: Add element article entities" in /admin/group/types/manage/GROUPTYPE/permissions
, esults in allowing the content creation,
the medialibrary accesshandler check will forbid adding media.
So both general and group permissions must be given.
Wrong project , sorry :|
As I said the workaround that I am testing is to use a new entity reference view, I cannot use the provided view as it's base table is group relationship rather than taxonomy term so it cannot be used as an entity reference eligible view.
I am attaching the view, maybe it could be included in module, as it's as generic as it could be. Maybe later I could write some browser tests to assert it works as it should.
aleix → created an issue.
I have created the MR, however I'll inform AdamPS, to ask for minor things that could help improve the plugin:
how is imported, help tips when writing body, user switch need, and finally the issues with how pdf is rendered via entity_print.
Anyway I have tested it and it works so good!
(marking as needs review but Draft MR as I would like to be reviewed by commerce ticketing maintainers too).
Now that tests are passing, it can be reviewed!
Adding patch for composer purposes
BTW i am using
adding patch
The proposal is to add again the theming, I have tested and it doesn't exclude layout builder.
Hi, we implemented it in jazzterrassa.org (D10).
Related on this the entity_print has issues with drupal 10.1 :
https://www.drupal.org/project/entity_print/issues/3383187
🐛
Unexpected error with print engine PhpWkhtmlToPdf or DomPdf: Session has not been set
Needs review
so whenever maintainers release this module, I think it will need to bump the version of Entity Print to latest version with this patch merged.
(I could add as new issue but it's not clear to which version the issue must be attached to)
#5 worked, It solves the related commerce ticketing send of mail issues
reroll for 3.0.x
The same as #14 but for 3.0.x
Adding new patch with proper CS and resultInterface new methods, for 3.0.0-beta1 .
@Hatuhay Despite this approach will work, it's not recommended and it's better to never add an issue fork git repo as a regular composer repository source. It will lead to unsecure site, as others could write arbitrary code.
If you want to do so, clone the issue fork repository to your own and add your repository instead.
Thank's! committed and credited.