πŸ‡³πŸ‡±Netherlands @SpadXIII

Account created on 22 February 2012, over 12 years ago
  • Drupal developer at SIMΒ  …
#

Merge Requests

Recent comments

πŸ‡³πŸ‡±Netherlands SpadXIII

Ran into this issue myself as well, I've added a small patch that helped me with making my entity type (that uses a machine-name as id) revisionable

I haven't added any tests, just a POC that seems to work good enough for me to continue :)

πŸ‡³πŸ‡±Netherlands SpadXIII

I think there should be a code-change as well, as drush 11 deprecated the drush.services.yml (drush 12 doesn't support it anymore): https://www.drush.org/11.x/dependency-injection/#services-files

Also, there is a new requirement that the drush commands should be in a 'Drush' subfolder, see the commands.md:

1. Drush 12 expects commandfiles to use a [create() method](dependency-injection.md#create-method) to inject Drupal and Drush dependencies. Prior versions used a [drush.services.yml file](https://www.drush.org/11.x/dependency-injection/#services-files) which is now deprecated and will be removed in Drush 13.
1. Drush 12 expects all commandfiles in the `/Drush/` directory. The `Drush` subdirectory is a new requirement.

πŸ‡³πŸ‡±Netherlands SpadXIII

I ran into this with a rest controller myself where it had "string|int" as its parameter.

Added a small change to the if-statement in \Drupal\Component\Utility\Reflection::getParameterClassName:
method_exists($parameter->getType(), 'isBuiltin')

I'm not sure how to handle union types in this case, but this patch allowed me to prevent the error from happening :)

πŸ‡³πŸ‡±Netherlands SpadXIII

I've included this in 3.x

πŸ‡³πŸ‡±Netherlands SpadXIII

I've included this in 3.x

πŸ‡³πŸ‡±Netherlands SpadXIII

Looks like this was already reported in #3412728

πŸ‡³πŸ‡±Netherlands SpadXIII

Thanks for the fix. I've included this in 3.x

πŸ‡³πŸ‡±Netherlands SpadXIII

Found a small bug where it would set an error on the values array from the form_state; fixed it by pointing the error to the form field instead

old:
$form_state->setError($entity_element, $this->t('Link to is deprecated. Remove its value and use WYSIWYG Link button functionality over embedded entity.'));

new:
$form_state->setError($form['attributes']['data-entity-embed-display-settings']['link_url'], $this->t('Link to is deprecated. Remove its value and use WYSIWYG Link button functionality over embedded entity.'));

πŸ‡³πŸ‡±Netherlands SpadXIII

did a quick re-roll on the latest 8.x-1.x

πŸ‡³πŸ‡±Netherlands SpadXIII

v40.2.0 seems to have fixed the anchors-issue indeed!

I don't want to put it on RTBC just yet, as I manually patched our drupal site instead of using 10.2.x

πŸ‡³πŸ‡±Netherlands SpadXIII

I've updated the patch in #13

a couple missing .once-calls and changed the way it was used in paragraphs.js

can't seem to generate an interdiff due to 'interdiff: Whitespace damage detected in input' ?

πŸ‡³πŸ‡±Netherlands SpadXIII

Added a little bit of code to 'toggle' the sticky toolbar, because it was not taking up the available width when going to fullscreen and/or back.
By toggling the isSticky-bit in the toolbar, it would figure out the correct width and use that.

πŸ‡³πŸ‡±Netherlands SpadXIII

This mr should do it; it disables the button when in source editing mode now.

πŸ‡³πŸ‡±Netherlands SpadXIII

SpadXIII β†’ made their first commit to this issue’s fork.

πŸ‡³πŸ‡±Netherlands SpadXIII

I tried to get something working, but did not succeed.

My goal was to use the alias during editing and store the node-url in the database. The link would then show the node alias in the editor, but in the database the node/ was stored. By adding another data-property (data-entity-path) I tried adding a editorDowncast and dataDowncast in the plugin, but that didn't work correctly: it would create a new a-tag wrapping the one that was being made by the base link plugin.

By adding a general upcast conversion, the href is changed to the alias:

editor.conversion.for('upcast')
      .elementToAttribute( {
        view: {
          name: 'a',
          attributes: {
            href: true,
            ['data-entity-alias']: true
          }
        },
        model: {
          key: 'linkHref',
          value: viewElement => viewElement.getAttribute('data-entity-alias'),
        },
        converterPriority: 'high'
      } );

But I failed trying to move the other way around. I tried adding a dataDowncast (which would set the path back to the href), and an editorDowncast (which would use the alias as href). This didn't work, because when creating an element with the same attribute, would add another element to the html instead of merging them (effectively overwriting the href-attribute)
I also tried using a data downcastDispatcher, but that doesn't seem to be able to get the correct viewElement (or rather, it couldn't find any element at all).

ps. there are some other code changes required as well to not only pass but also use the alias and path in the links.

πŸ‡³πŸ‡±Netherlands SpadXIII

Added the line in a new merge request

πŸ‡³πŸ‡±Netherlands SpadXIII

just a quick note: patches still apply to 2.1

πŸ‡³πŸ‡±Netherlands SpadXIII

Looks good and still applies to 2.x :)
We've been using this for almost a year in production now

πŸ‡³πŸ‡±Netherlands SpadXIII

Added the mr and linked this to a related issue: 3050868 β†’

πŸ‡³πŸ‡±Netherlands SpadXIII

Created a merge request with the local caching vars.

πŸ‡³πŸ‡±Netherlands SpadXIII

I've added some functionality to allow setting of some options for both PhpRedisCluster and PredisCluster.
I was missing the 'scheme' option and the timeout options.

As seen here, https://github.com/phpredis/phpredis/blob/develop/redis_cluster.stub.php..., the RedisCluster class allows for a context-array to be passed into the constructor. (It's not documented properly yet, and I can't find the issue I came across that mentions this method argument :) )

With my addition, it's possible to set the scheme to tls like so: $settings['redis.connection']['scheme'] = 'tls';
The options `timeout` and `read_timeout` are also used.

πŸ‡³πŸ‡±Netherlands SpadXIII

SpadXIII β†’ made their first commit to this issue’s fork.

πŸ‡³πŸ‡±Netherlands SpadXIII

I seem to have forgotten to add a use-statement. Fixed in new patch.

πŸ‡³πŸ‡±Netherlands SpadXIII

As the ticket responsible for postponing this has been merged and fixed (and released), I've re-rolled the latest patch against 2.x.

And putting it back to needs review

πŸ‡³πŸ‡±Netherlands SpadXIII

I ran into a little issue with paragraphs where one of the paragraphs has a linkit-field. When the user types in an invalid uri and then tries to add a new paragraph-item, an exception is preventing the new paragraph to be added.
One part of the problem is that the add-more button in paragraphs has a limit_validation_errors, so no validation is done or error is shown at all. I tried removing this, but that didn't work properly: it would validate the whole form and show error-messages in a way that's confusing for the user. After a bit of digging, I found that the error is an exception thrown when trying to make an Url-object from the invalid uri. So after adding a try/catch, it works fine :)
I based this change on the patch in #293, as we're still using version 5.x of linkit.

Note that this change also requires a patch in core for the link field widget. (Same change basically): 3340154 πŸ› Link-widget throws exception when rebuilding a form with an invalid uri Fixed

πŸ‡³πŸ‡±Netherlands SpadXIII

I found that the last patch didn't work for our platform anymore. We use flysystem (and s3/cloudfront) so our 'file public path' isn't anywhere near /sites//files and had to find a different solution.

I removed the whole part of trying to rewrite the file-path, because the path is fine already.
I've added the 'is_file' boolean to the $parts so that the alter can change it later on. (We added an alter to set is_file to true for flysystem-urls)

πŸ‡³πŸ‡±Netherlands SpadXIII

Found another small issue where it would strip the time from the entered values. And the end-value wasn't handled correctly.

Here's a new patch.

πŸ‡³πŸ‡±Netherlands SpadXIII

Found another bug where it would still validate when leaving the end-date empty.

ps. an interdiff doesn't seem to generate : interdiff: Whitespace damage detected in input

πŸ‡³πŸ‡±Netherlands SpadXIII

I added the getUniqueId-suggestion by rfbrandsma to the patch in #188. Other than this addition, the patch is identical to the #188 one.

I just saw the notice mentioned by prudloff. This was with a field that had no parents.

πŸ‡³πŸ‡±Netherlands SpadXIII

I noticed a little typo in the patch, so here's an updated version.

Production build 0.69.0 2024