Account created on 26 September 2022, over 2 years ago
#

Merge Requests

More

Recent comments

🇮🇳India keshav patel

Oh, I missed reviewing the dependency.

Here you go: 1.0.9

🇮🇳India keshav patel

Thanks @jannakha ,

I made few adjustments and merged the changes, the changes are now available on latest release. i.e. 1.0.8.

Closing this issue.

🇮🇳India keshav patel

Makes sense to me @jwilson3.
Made this custom command similar to the version that's added to the Drush core v13.6.0.

🇮🇳India keshav patel

Added a helpful note for users having Drupal projects with PHP versions < 8.3

🇮🇳India keshav patel

@ressa,
I think we can remove it once, Drupal-10 reaches End of life. [Read here: D10 EOL  and Drush support]

So the users with lower PHP versions can benefit from it.

🇮🇳India keshav patel

I think we can close this issue now, 'theme:dev' [alias: 'thdev' ] is added to Drush 13.6 version.

Also, after Drush 13.6 the 'twig:debug' is marked as deprecated.

🇮🇳India keshav patel

Thanks for the suggestions.

I've added the illustrative screenshots and added a new release with Drupal-11 support.

Check here: https://www.drupal.org/project/set_field_defaults

🇮🇳India keshav patel

Hello @ressa ,

The module Field Defaults can be used when:
> When creating a new field or updating an existing field.
> What it does is, when we add / update any fields configuration [for that particular entity type bundle, eg: Article]. It allows us to update or preserve all the existing content for that field for that particular bundle.
> We can consider this module as an assistant to Bulk Operations on field values per bundle.

What the Field Default Values module provides is:
> It gives us the configuration form (/admin/config/field-defaults), which allows us to set the default values for some majorly used field types. such as Text fields, Number fields, Email etc.
> Whenever we create a new field on any entity type, on any entity bundle.. It automatically checks the "Set default value" checkbox and pulls the default value from our saved configs for that field type.
> Means, just the one time process saves our time to fill default values.., whenever we plan to create the field of particular field type at any place over the entire site.
> Note: It works only when we create a new field.

🇮🇳India keshav patel

keshav patel made their first commit to this issue’s fork.

🇮🇳India keshav patel

Added short description at the top. 

🇮🇳India keshav patel

@ressa ,

In context of #20 Easy way to bypass all caching with Drush or settings.php Active and #22 Easy way to bypass all caching with Drush or settings.php Active :

Yes we surely can try adding it in the core or module, it'll help almost everyone. then their won't be any extra steps to setup this.

🇮🇳India keshav patel

Hello @ressa , @quietone and @dqd

I've added a page under Local server setup => Custom Drush command for managing Twig debugging and CSS/JS aggregation

Please have a look.

Instead of adding a flag on Settings.php, I though creating a Custom Drush command will be more handy.

🇮🇳India keshav patel

Highlighted the note, mentioned after final step.

🇮🇳India keshav patel

PHPUnit tests are failing, marking it as "Needs work".

🇮🇳India keshav patel

Hello /u/alexbukach,

Can you please check this, It'll be better if it is merged.

🇮🇳India keshav patel

Hello @avpaderno , Thanks for a thorough review!
I've worked on suggested improvements, please check.

🇮🇳India keshav patel

Requesting for the "maintainer" role for the guide:

I've worked on Linux, WSL2 and XAMPP on Windows and also Docker on WSL2 Drupal Setups.

We can mention the steps with details about these setups, also on windows there are some pre-requisites and adjustments that can be added on this guide to make it more helpful.

🇮🇳India keshav patel

keshav patel made their first commit to this issue’s fork.

🇮🇳India keshav patel

Reviewed the MR, the removed part is not added back for stable9.

🇮🇳India keshav patel

Yes I checked that, we don't need existence check after unsetting the hook. I've updated the comment to be make it informative and squashed all the work in a single commit.

🇮🇳India keshav patel

I think we're good now, just needs a review if anything is left.

Also, once this is merged. I think I'll be better to specify:

Keep URL alias field untranslated.

as requirement.

🇮🇳India keshav patel

@xen Till now we're done with the duplicate alias issue.

Now we're left with, multiple aliases existence for the same entity i.e. same alias not getting updated.

Regarding:

What do you mean specifically? I notice that path_entity_base_field_info() sets the pathbase field to translatable, but I don't know if that really affect us as we're dealing with alias.

path_entity_translation_create() seems to be the cause of our woes, as it unsets the pid of the alias (but keep the alias) when creating a translation. Maybe disabling that will make things behave.

Yes, the hook path_entity_translation_create() is the culprit here, line: $translation->get($field_name)->pid = NULL; is to be taken of.

Taking your suggestion, I removed the form alter implementation so that the Alias can be added / updated anywhere.

With that, we're left with two test cases:

URL Alias is: Translated and $translation->get($field_name)->pid = NULL; is commented

-> When node is created (let's say alias: '/test') and on translation add, alias is changed (let's say to 'test-fr'), the alias does not get updated and the alias still remains as '/test'.
-> That is, during create operation [translation add] the changed alias value is not saved even if it's updated.
-> When translated are created. after that if the alias is updated on source or translation . that changes happen correctly and alias are reflected.

URL Alias is: Un-translated and $translation->get($field_name)->pid = NULL; is commented

-> Only one alias instance is present and is getting updated. [On Node create / edit, translation add / update]

Considering this, we've to keep the URL alias as un-translated and Override path_entity_translation_create() hook.

🇮🇳India keshav patel

Thanks for the review @vishal.kadam .

Also, as mentioned on What to expect from the review process section:

Once all issues have been addressed:
The reviewers will change the status of the issue to Reviewed & tested by the community

Please change the status to RTBC.

🇮🇳India keshav patel

Thanks for the feedback @vishalkadam .

Fixed all reported issues, please review.

🇮🇳India keshav patel

Hello @xen , thanks for the feedback!

Yes will update the MR to respect OOP.

But the second part:

hiding the path on translations hides the fact that the translation *does* have an alias. I'd rather skip that part and live with the fact that editing the path on the translation also edits the original language alias.

I hid that field from translation pages by considering the scenarios duplicate aliases, multiple aliases and when using the "pathauto" module as well, like there are some points to take into consideration:
1) The URL Alias field must set as untranslated when using this module.
2) If kept translated this module can create duplicates or multiple aliases(distinct) for same "path".
3) In case when "pathauto" exists and "Generate Automatic Alias" is checked, it'll create duplicates.

I even tried to overcome the duplicate / multiple alias generation issue while keeping the URL alias field visible everywhere, but alias entity is generated before it reaches "NeutralPathAliasStorage.php".

Also, please do let me know if anything else I can try here..

🇮🇳India keshav patel

The MR contains 1000+ changes which are outside of this issues scope.
Please raise correct MR.

🇮🇳India keshav patel

Raised an MR with the provided patch on #4#4,
Keeping it on Needs work until tests are added.

🇮🇳India keshav patel

keshav patel made their first commit to this issue’s fork.

🇮🇳India keshav patel

Created an MR using #2 patch, needs review.

🇮🇳India keshav patel

Created an MR from the patch provided on #2, keeping it on needs review.

🇮🇳India keshav patel

@swentel
Please check that "file_validate_extensions" is mistakenly substituted by "FileImageDimensions", it should be changed to "FileExtension".

🇮🇳India keshav patel

Please describe the issue in accordance with the default provided issue summary template, It'll become more readable and helpful.

Thanks!

🇮🇳India keshav patel

MR contains 136 changes, also the target branch for the MR is incorrect.

It should be raised against 3.x branch.

🇮🇳India keshav patel

Changes looks good to me as per the change record , still marking as "Needs review" for others to review.

🇮🇳India keshav patel

Fixed some Drupal coding standard issues, but I think there are 4 such issue which we've to live with or we can suppress them:

FILE: src/Plugin/CKEditor4To5Upgrade/AdvancedLink.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------
 30 | ERROR | Public method name "AdvancedLink::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem" is not in lowerCamel format
 37 | ERROR | Public method name "AdvancedLink::mapCKEditor4SettingsToCKEditor5Configuration" is not in lowerCamel format
 44 | ERROR | Public method name "AdvancedLink::computeCKEditor5PluginSubsetConfiguration" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------------------------------
Reason: Core too uses naming in the same format. (@see Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface)

FILE: /tests/src/Kernel/CKEditor4To5Upgrade/UpgradePathCompletenessTest.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 15 | ERROR | Class name doesn't match filename; expected "class UpgradePathCompletenessTest"
------------------------------------------------------------------------------------------------------------
Reason: Class exists with the same name (@see line:42), but there are multiple classes on the same file.
🇮🇳India keshav patel

keshav patel made their first commit to this issue’s fork.

🇮🇳India keshav patel

@webmestre Please test your installed module version quickly in fresh Drupal instance here: simplytest.me.

I think you're facing site specific issues due to customizations. In case you're able to replicate the issue on simplytest.me, please attach the screenshots.

🇮🇳India keshav patel

Please check out this module: AI Image Alt Text , maybe it can help.

🇮🇳India keshav patel

@webmestre

Please add few more details, I was not able to reproduce the issue with this minimal information.
Also, when I picked the date ranges.. the time picker needed to be clicked in order to record the changes (means it was reflecting correct results, ex: 2026-08-05 12:00)

🇮🇳India keshav patel

The issue status had to be on Needs review.

Tested the the MR changes, no phpcs issues found.
Moving it to RTBC.

🇮🇳India keshav patel

Rerolled #31 to MR, fixed coding standards as well.

But it's failing two phpstan testcases.

🇮🇳India keshav patel

keshav patel made their first commit to this issue’s fork.

🇮🇳India keshav patel

Thanks a lot for saving debugging time.

Works fine.

🇮🇳India keshav patel

Thanks everyone, I've merged the changes.

🇮🇳India keshav patel

Minor correction for #3
Make URL Alias field, accessible only on source language. handles the issue-2 for us.
Marking issue as "Needs review".

🇮🇳India keshav patel

Issue-1 is handled and needs review , Issue-2 remains..
Keeping issue on "Needs work".

🇮🇳India keshav patel

Although purpose is clear from the issue title, still the issue summary needs to be updated.

🇮🇳India keshav patel

In the menu, the " Local development guide " and " Installing Drupal => Install Drupal using DDEV " Both contain the steps to get started with drupal using ddev, but going through the " Install Drupal using DDEV " page, I found it better descriptive.

Suggestion:
We can merge both pages and bring Install Drupal using DDEV link at the primary level (replace at "Local development guide" menu item. )

🇮🇳India keshav patel

Update the code to resolve "included" key data correctly for multilingual sites, please review.

🇮🇳India keshav patel

@ressa as per #17 I guess you're referring to hook_install() and hook_uninstall().
yes we can do that, but standard settings will vary user to user, like for live site "aggregation can be kept ON and debug mode disabled".

Can you please share what settings you want to default it to upon module uninstall ? will share that part as well..

🇮🇳India keshav patel

@ressa you can use this code snippet on any hook, event or on devel_php executer. It'll work.
Then you can visit "/admin/config/development/performance" and "/admin/config/development/settings" to verify the changes, no extra code needed.

🇮🇳India keshav patel

Read above comments, and thought of trying it myself to achieve the listed requirement via single flag on Settings.php file.

Settings.php: [Set caching_aggregation flag to FALSE]

$settings['caching_aggregation'] = FALSE;

Code:

    $caching_aggregation = \Drupal\Core\Site\Settings::get('caching_aggregation', TRUE);

    if(!$caching_aggregation){
      // Enable Twig Debug Mode.
      $keyValueFactory = \Drupal::service('keyvalue');
      $development_settings = $keyValueFactory->get('development_settings');
      $twig_development = [
        'disable_rendered_output_cache_bins' => TRUE,
        'twig_debug' => TRUE,
        'twig_cache_disable' => TRUE,
      ];
      $development_settings->setMultiple($twig_development);

      // Disable CSS and JS Aggregation.
      $performance = \Drupal::configFactory()->getEditable('system.performance');
      $performance->set('css.preprocess',FALSE);
      $performance->set('js.preprocess',FALSE);
      $performance->save();
    }

But the question still remains that, if not drush command then when to invoke it?
For testing purposes I invoked it on form submit event.

Hope it helps someone, Thanks!

🇮🇳India keshav patel

@isalmanhaider, can you be more specific about which Drupal version you faced the issue? I've tested this on Drupal 10.2, and the module was uninstalled without any problems.

Adding "issue summary update" tag as well.

🇮🇳India keshav patel

Updated the #8 patch, the patch on #10 applies cleanly. please review.

🇮🇳India keshav patel

Updated as per #21, please review.

🇮🇳India keshav patel

Keshav Patel made their first commit to this issue’s fork.

🇮🇳India keshav patel

Added the issue summary according to the standard issue template.

🇮🇳India keshav patel

Please mention the steps to reproduce the issue and update the issue summary accordingly.

🇮🇳India keshav patel

Keshav Patel made their first commit to this issue’s fork.

🇮🇳India keshav patel

Created the MR using the #26 patch and addressed comment #35 as well, but the pipeline failed. keeping it on "Needs work".., please review the changes.

Change as per #35:

   /**
    * Returns the filter format this text editor is associated with.
    *
    * @return \Drupal\filter\FilterFormatInterface
    *
    * @throws \DomainException
 -  *   If called without an associated filter format.
 +  *   Thrown if the text editor is called without an associated filter format.
    */
  public function getFilterFormat();
Production build 0.71.5 2024