πŸ‡ͺπŸ‡ΈSpain @eduardo morales alberti

Spain, πŸ‡ͺπŸ‡Ί
Account created on 26 September 2017, over 7 years ago
  • Senior Drupal Developer at MetadropΒ 
#

Merge Requests

More

Recent comments

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Site structure

Menus: /en/admin/reports/xray-audit/site-structure/menu

We changed the view to show all menus on the same table to make it easy to download.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

@lpeidro
We changed to tabs Entities Displays, as they were different operations, and to maintain the standard of one operation and a download button per page.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Example of report CSV download:

Added download button on almost all reports, except XrayAuditQueryTaskImageStylesPlugin as the current data structure was too difficult to adapt.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

ZipArchiver does not works properly on Drupal 9.5, needs patch from issue https://www.drupal.org/project/drupal/issues/2850794 πŸ› Unable to open Zip archive using ArchiverZip Fixed

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

We had the same problem with CloudFlare as it sorts the parameters and leads on the oembed items not loading.
The change solves it.
We added a hook update to clear the caches, because the hook post update only is launched if there is any update pending to be executed.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

eduardo morales alberti β†’ made their first commit to this issue’s fork.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Added target types configuration:

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Ready to review

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Remove internal links as already have a section on targets.
Move external links to targets.
Add schemas like mail, tel.. to targets => Other.
Add sections on targets:
Entities
Views
Others/Schema
...

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Duplicated https://www.drupal.org/project/entity_mesh/issues/3518164 ✨ Allow choose the entity type and bundle from configuration Active

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Added new configuration to choose which content will be processed

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

@himanshu_jhaloya The patch does not works because the validation is done before the method removeUtilityClassValue is called, so the form state already have required issues.

Also, cover removeUtility button.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

The problems is solved by clicking on "Check manually", so the projects that have been uninstalled can be ignored.

https://www.drupal.org/project/drupal/issues/3270052#comment-14628951 πŸ› Undefined array key in prepareUpdateData Active

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Maybe the patch should also removed the uninstalled projects if were removed.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Same problem here https://www.drupal.org/project/drupal/issues/3270052#comment-16089374 πŸ› Undefined array key in prepareUpdateData Active

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

In our case seems like the "locale.translation_status" has modules that were removed from the project but not from the key:

 
$status = \Drupal::keyValue('locale.translation_status')->getAll();
 
$module_handler = \Drupal::service('module_handler');
$module_handler->loadInclude('locale', 'inc', 'locale.compare');
$modules = \Drupal::service('extension.list.module')->getList();
$themes = \Drupal::service('extension.list.theme')->getList();
$project_list = array_merge($modules, $themes);
print_r(array_diff(array_keys($status), array_keys($project_list)));

Those modules were already removed from Drupal:

Array
(
    [0] => acquia_connector
    [1] => acquia_search
    [3] => addtoany
    [5] => advagg
    [9] => blazy
    [12] => colorbox
    [13] => colorbox_media_video
    [15] => config_filter
    [18] => config_update
    [19] => consumers
    [27] => email_registration
    [56] => jquery_ui_datepicker
    [58] => jsonapi_earlyrendering_workaround
    [59] => jsonapi_extras
    [64] => maillog
    [69] => memcache
    [74] => migrate_plus
    [107] => simple_oauth
    [115] => transliterate_filenames
)

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

We made some changes, including adding an OperationTimeCompressingHandler, to compress the logs, as they can be heavy on large sites.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

We maintained the following list as the following attributes were not on the module:

spacing
spacing-y
spacing-x
headings
font-size
font-family
  • text-align
    • left
    • right
    • center
  • color
    • primary
    • secondary
  • background-color
    • primary
    • secondary
  • btn
    • primary
    • secondary
    • success
    • info
    • warning
    • danger
  • btn-size
    • large
    • small
πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

On the custom theme option we will keep only the following utilities as a base:

buttons
badge
text-align
text-color
bg-color
spacing
spacing-y
spacing-x
headings
font-size
font-family
πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Currently, the log entities are saved on a file archived_entity-YY-MM-DD.csv, but the date is when the file was created, and then, it does not match with the entity_logs, change the rotating file handler to use the entity logs dates.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Duplicated of https://www.drupal.org/project/log_entity_operations/issues/3520644 ✨ Add the hability to recover removed entity log operations Active

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

@luke.leber We are not sure how to contribute a test for it, as we are removing the attribute id, so we can not test that the id is duplicated, as it does not exist.

Do you refer to creating a test of the current code, testing the ID duplication?

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Solved PHPStan and PHPCS warnings, pending CSPell and stylelint

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

PHPStan Errors:

 ------ --------------------------------------------------------------------------- 
  Line   modules/vlsuite_block/modules/vlsuite_block_cta/vlsuite_block_cta.install  
 ------ --------------------------------------------------------------------------- 
  38     Access to constant BUNDLE_KEY on an unknown class VLSuiteBlockCta.         
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols        
  38     Class VLSuiteBlockCta not found.                                           
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols        
 ------ --------------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------------- 
  Line   modules/vlsuite_block/modules/vlsuite_block_icon/vlsuite_block_icon.install  
 ------ ----------------------------------------------------------------------------- 
  38     Access to constant BUNDLE_KEY on an unknown class VLSuiteBlockIcon.          
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols          
  38     Class VLSuiteBlockIcon not found.                                            
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols          
  45     Access to constant BUNDLE_KEY on an unknown class VLSuiteBlockIcon.          
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols          
  45     Class VLSuiteBlockIcon not found.                                            
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols          
 ------ ----------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------- 
  Line   modules/vlsuite_block/modules/vlsuite_block_image/vlsuite_block_image.install  
 ------ ------------------------------------------------------------------------------- 
  27     Access to constant BUNDLE_KEY on an unknown class VLSuiteBlockImage.           
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols            
  27     Class VLSuiteBlockImage not found.                                             
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols            
 ------ ------------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------------- 
  Line   modules/vlsuite_block/src/Controller/VLSuiteBlockChooseBlockController.php  
 ------ ---------------------------------------------------------------------------- 
  20     Class                                                                       
         Drupal\vlsuite_block\Controller\VLSuiteBlockChooseBlockController           
         extends @internal class                                                     
         Drupal\layout_builder_restrictions\Controller\ChooseBlockController.        
 ------ ---------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------- 
  Line   modules/vlsuite_block/src/Plugin/Block/VLSuiteFieldBlock.php       
 ------ ------------------------------------------------------------------- 
  29     Class Drupal\vlsuite_block\Plugin\Block\VLSuiteFieldBlock extends  
         @internal class Drupal\layout_builder\Plugin\Block\FieldBlock.     
 ------ ------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------- 
  Line   modules/vlsuite_block/src/Plugin/Block/VLSuiteInlineBlock.php       
 ------ -------------------------------------------------------------------- 
  28     Class Drupal\vlsuite_block\Plugin\Block\VLSuiteInlineBlock extends  
         @internal class Drupal\layout_builder\Plugin\Block\InlineBlock.     
 ------ -------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------------- 
  Line   modules/vlsuite_block/src/Plugin/Derivative/VLSuiteFieldBlockDeriver.php  
 ------ -------------------------------------------------------------------------- 
  13     Class Drupal\vlsuite_block\Plugin\Derivative\VLSuiteFieldBlockDeriver     
         extends @internal class                                                   
         Drupal\layout_builder\Plugin\Derivative\FieldBlockDeriver.                
 ------ -------------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------------------- 
  Line   modules/vlsuite_block/src/Plugin/Derivative/VLSuiteMediaBgFieldBlockDeriver.php  
 ------ --------------------------------------------------------------------------------- 
  14     Class                                                                            
         Drupal\vlsuite_block\Plugin\Derivative\VLSuiteMediaBgFieldBlockDeriver           
         extends @internal class                                                          
         Drupal\layout_builder\Plugin\Derivative\FieldBlockDeriver.                       
  27     \Drupal calls should be avoided in classes, use dependency injection             
         instead                                                                          
 ------ --------------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------- 
  Line   modules/vlsuite_block/vlsuite_block.module                      
 ------ ---------------------------------------------------------------- 
  185    Fetching deprecated class constant EXISTS_REPLACE of interface  
         Drupal\Core\File\FileSystemInterface:                           
         in drupal:10.3.0 and is removed from drupal:12.0.0. Use         
         \Drupal\Core\File\FileExists::Replace instead.                  
 ------ ---------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   modules/vlsuite_collection/src/VLSuiteCollectionHelper.php           
 ------ --------------------------------------------------------------------- 
  96     Call to static method encode() on an unknown class                   
         Drupal\Core\Serialization\Yaml.                                      
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  120    Call to static method decode() on an unknown class                   
         Drupal\Core\Serialization\Yaml.                                      
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  193    Fetching deprecated class constant EXISTS_REPLACE of interface       
         Drupal\Core\File\FileSystemInterface:                                
         in drupal:10.3.0 and is removed from drupal:12.0.0. Use              
         \Drupal\Core\File\FileExists::Replace instead.                       
 ------ --------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   modules/vlsuite_demo/vlsuite_demo.install                            
 ------ --------------------------------------------------------------------- 
  127    Call to static method decode() on an unknown class                   
         Drupal\Core\Serialization\Yaml.                                      
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
 ------ --------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------------------ 
  Line   modules/vlsuite_generator/src/Drush/Generators/VLSuiteGeneratorModuleGenerator.php        
 ------ ------------------------------------------------------------------------------------------ 
  136    Parameter $default_content_exporter of method                                             
         Drupal\vlsuite_generator\Drush\Generators\VLSuiteGeneratorModuleGenerator::__construct()  
         has invalid type Drupal\default_content\ExporterInterface.                                
 ------ ------------------------------------------------------------------------------------------ 
 ------ ------------------------------------------------------------------------------------------------ 
  Line   modules/vlsuite_layout/modules/vlsuite_layout_tabs/src/Plugin/Layout/VLSuiteLayoutTabsBase.php  
 ------ ------------------------------------------------------------------------------------------------ 
  167    \Drupal calls should be avoided in classes, use dependency injection                            
         instead                                                                                         
 ------ ------------------------------------------------------------------------------------------------ 
 ------ ----------------------------------------------------------------- 
  Line   modules/vlsuite_modal/src/Form/VLSuiteModalSettingsForm.php      
 ------ ----------------------------------------------------------------- 
  129    Call to deprecated method clearCachedDefinitions() of interface  
         Drupal\Core\Asset\LibraryDiscoveryInterface:                     
         in drupal:11.1.0 and is removed from drupal:12.0.0. Use          
         LibraryDiscoveryCollector::clear() instead.                      
 ------ ----------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   modules/vlsuite_modal/src/VLSuiteModalConfigOverride.php              
 ------ ---------------------------------------------------------------------- 
  101    \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
 ------ ---------------------------------------------------------------------- 
 [ERROR] Found 23 errors                                                    
πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

CSpell

| Original        | Corrected         |
|----------------|-------------------|
| acive          | active            |
| activado       | activated         |
| animatecss     | Animate.css       |
| autocollapse   | auto-collapse     |
| autoresize     | auto-resize       |
| behaviour      | behavior          |
| botom          | bottom            |
| builderlink    | builder link      |
| cardinallity   | cardinality       |
| clasees        | classes           |
| clases         | classes           |
| clientside     | client-side       |
| completly      | completely        |
| contentvlsuite | content VLSuite   |
| cpath          | cPath             |
| crect          | correct           |
| csvg           | CSVG              |
| dependecies    | dependencies      |
| depenencies    | dependencies      |
| deprecatedfield| deprecated field  |
| desactivado    | deactivated       |
| descarted      | discarded         |
| dialogclose    | dialog close      |
| dinamically    | dynamically       |
| dynamize       | dynamize (consider rephrasing) |
| everytning     | everything        |
| fourcols       | four columns      |
| galleryvlsuite | gallery VLSuite   |
| groupelement   | group element     |
| indentifier    | identifier        |
| initiazilation | initialization    |
| laning         | planning          |
| limititations  | limitations       |
| linuxfoundation| Linux Foundation  |
| nagination     | pagination        |
| navlink        | nav link          |
| olumn          | column            |
| opctions       | options           |
| otherwhise     | otherwise         |
| overing        | hovering          |
| palcehold      | placeholder       |
| placehold      | placeholder       |
| preffix        | prefix            |
| proccesed      | processed         |
| procesing      | processing        |
| provinding     | providing         |
| quoute         | quote             |
| reduntant      | redundant         |
| remoto         | remote            |
| resovler       | resolver          |
| scrollpy       | ScrollSpy         |
| scrope         | scope             |
| selecto        | selector          |
| spicific       | specific          |
| swiperjs       | Swiper.js         |
| sysyem         | system            |
| tada           | Tada (animation)  |
| textdirection  | text direction    |
| threecols      | three columns     |
| twocols        | two columns       |
| udate          | update            |
| uidom          | UI DOM            |
| usement        | usage             |
| utilit         | utility           |
| utilitites     | utilities         |
| utilitties     | utilities         |
| utilty         | utility           |
| utitlities     | utilities         |
| vluiste        | VLSuite           |
| vΓ­deo          | video             |
| warantee       | warranty          |
| webforms       | Web Forms         |
| wher           | where             |
| whitout        | without           |

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Ready to review:
On a fresh installation:

  • Just access to /admin/config/vlsuite/utility-classes
  • Configure the framework
  • If it selects Bootstrap or Tailwind, it will load default utility classes
  • If it selects Custom, it will load the same utility classes as Bootstrap but empty, so each utility class will need to be filled or removed.
  • If the site already has configuration, the form will set bootstrap5 as the default framework
πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Ready to review:
On a fresh installation:

  • Just access to /admin/config/vlsuite/utility-classes
  • Configure the framework
  • If it selects Bootstrap or Tailwind, it will load default utility classes
  • If it selects Custom, it will load the same utility classes as Bootstrap but empty, so each utility class will need to be filled or removed.
  • If the site already has configuration, the form will set bootstrap5 as the default framework
πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

All errors were fixed on the main branch using tools like PHPCBF and Stylelint.

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Thank you, @omarlopesino, for reconsidering the feature

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Ready to review

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

The problem comes from \Drupal\entity_mesh\Repository::getLabel
As it gets the label from the entity, but not from the translation

  protected function getLabel(?string $entity_type, ?string $entity_id): ?string {
    if (empty($entity_id) || empty($entity_type)) {
      return NULL;
    }

    try {
      $storage = $this->entityTypeManager->getStorage($entity_type);
    }
    catch (PluginNotFoundException $e) {
      return NULL;
    }

    /** @var \Drupal\Core\Entity\EntityInterface $entity */
    $entity = $storage->load($entity_id);
    if (!$entity instanceof EntityInterface) {
      return NULL;
    }

    return $entity->label();
  }
πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Pending to review PHPUnit

There were 18 errors:
1) Drupal\Tests\entity_mesh\Kernel\EntityMeshEntityRenderMultilingualTest::testLinks with data set "Internal valid link EN" (2, '/fr/node/1', 'internal', 'link', 'Test Node FR (node - 1)', null, 'node', 'page', 1, 'fr', null, null, null, null)
Error: Call to a member function switchToDefault() on null

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Ready to review

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Created issue on core to provide service theme switcher

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Refactor code to delete also inline entities

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Hi!! Any news about a stable release with these changes?

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Any news?

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Any news?

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Any news of a stable release compatible with Drupal 11?

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Any news about a new release?

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Solve all threads @tunic

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

Ready to review https://git.drupalcode.org/project/xray_audit/-/merge_requests/74#note_4...

The strategy was to create a decorator that registers when a resource gives an exception, it saves on a xray_audit_insight table with the message and the url.

https://git.drupalcode.org/project/xray_audit/-/merge_requests/74/diffs#...

  public function fetchResource($url) {
    try {
      return $this->resourceFetcher->fetchResource($url);
    }
    catch (ResourceException $e) {
      // Log the exception to the xray_audit_insight table.
      $this->insightReport->addInsightData(
        'external_resource',
        $e->getMessage(),
        $url
      );

      throw $e;
    }
  }

We also created a External Resources task on Content Display group.

If the module insight is enabled then it shows the resources that needs to be reviewed.

Also, if there there are resources to be reviewed it shows it on the status report:

Production build 0.71.5 2024