Skip to main content
Penyaskito Blog

Main navigation

  • Home
Language switcher
  • English
  • Español
User account menu
  • Log in

Breadcrumb

  1. Home

contributing

By penyaskito , 4 July, 2026
Image
The same JSON, stored and read back from different database engines

Canvas Internals - JSON data types in different databases: It works on my machine!

Drupal has been working to add a JSON data type since 2023, but that has not landed yet. Drupal Canvas jumps ahead of that in its inputs for a component tree item with

'inputs' => [
  'description' => 'The input for this component instance in the component tree.',
  'type' => 'json',
  'pgsql_type' => 'jsonb',
  'mysql_type' => 'json',
  'sqlite_type' => 'json',
  'not null' => FALSE,
],

Recently some of our tests started failing for MySQL and Postgres on CI, but passed in SQLite and MariaDB, which is what most of us use locally. 

The problem was that the sorting of the keys of that field was not deterministic, and we used assertSame in our tests to see if operations added/removed the inputs as expected when components evolved. 

How does that translate to different engines?

For MySQL, there's a native data type. Quoting their docs:

To make lookups more efficient, MySQL also sorts the keys of a JSON object. You should be aware that the result of this ordering is subject to change and not guaranteed to be consistent across releases.

For PostgreSQL, the engine offers two different data types: json and jsonb, with the second being the option we (and core) opted for because of its efficiency. But that's key, as the docs explain:

In general, most applications should prefer to store JSON data as jsonb, unless there are quite specialized needs, such as legacy assumptions about ordering of object keys.

That's exactly what our problem was.

For MariaDB, the JSON type is just an alias. See their docs:

JSON is an alias for LONGTEXT COLLATE utf8mb4_bin introduced for compatibility reasons with MySQL's JSON data type. MariaDB implements this as a LONGTEXT rather, as the JSON data type contradicts the SQL:2016 standard, and MariaDB's benchmarks indicate that performance is at least equivalent.

And the last one, SQLite, has support for a jsonb format since 3.45, but the work in progress for introducing this in Core uses json, which, like MariaDB, is ordinary text and sorting of the keys is respected.

How did we fix this?

The actual sorting of the inputs in the database is, as of today, irrelevant to us. So we ended up with:

  • Our own assertSameInputs, which sorts the keys before comparison. assertEqualsCanonicalizing is not an option, as that sorts by value.
  • Our own PHPStan rule, which is not 100% accurate but detects most usages of assertSame with these inputs, and suggests using assertSameInputs instead. 

Translating Drupal Canvas

This is just one of the many show-stoppers that we faced while working on the much-anticipated symmetric translation support for Drupal Canvas. If you want to test this experimental feature, check the release notes in Canvas 1.7.0, but please only on test sites for now!

Tags

  • contributing
  • Drupal
  • Drupal Core
  • Drupal Canvas
  • multilingual
  • databases
  • PHPStan
  • JSON
  • Drupal planet
  • testing
By penyaskito , 3 July, 2026

Quarterly Contributions summary for 2026 Q2

Last April I started blogging about my quarterly contributions as a way to look back and see what I've been working on, even if I've been tracking for 6 quarters already.

On Drupal.org, last quarter I had credits at 1376. Now it's 1495. So 119 new credits, which is above 1.3 credits/day. Just by numbers, this is the biggest quarter since I have been tracking it.

Breaking those down, all of them have been on my 4 focus projects:

Canvas: 247 (+104)
Core: 162 (+12)
CMS*: 44 (+2)
Dashboard: 62 (+1)

Of course the majority of them concentrate in Drupal Canvas. Thanks Acquia for sponsoring lots of my open-source work.

This doesn't measure at all complexity, but I feel like these on Canvas have been more complex on average: bugs and features are definitely harder to implement. I guess I ate the AI Red Pill 🤷🏽. But it's not just 2x quantity-wise than previous quarter, it has a bigger impact quality-wise. 

And these numbers don't track the work on security fixes and/or releases which I've been doing for Canvas. 

I'd highlight that, outside of Drupal, I also got my first contributions to jsonrainbow/json-schema, the PHP library that Drupal core and Canvas use for JSON Schema validation. 

Happy coding! 🎉

Tags

  • contributing
  • quarterly-report
  • Drupal
  • Drupal Core
  • Drupal Canvas
By penyaskito , 4 April, 2026

Quarterly Contributions summary for 2026 Q1

One year ago I started tracking my own contributions to Drupal.org and posting a report on my Mastodon account. See the last quarter of 2025 report as an example. The goal is not to flex (it would be cheating given that Acquia sponsors me for working on Drupal Canvas almost full time); and this is far from being a good way of tracking contributions or your own productivity, but it's better than nothing. 

Still, it helps me evaluate where I've been focusing (out of necessity, from being nerdsniped, or just for fun), and check if I need to balance that for my "volunteer" contributions. In this last year I've been appointed as Drupal CMS committer (which includes maintainership of 20+ projects 😱😱😱), and Drupal Core subsystem maintainer for Content Translation and Language modules. So tracking where my efforts go is really helpful for self-accountability.

And to be fair, I spent more time maintaining this blog than writing, so finding a new topic that is recurrent is a good way to force me to keep it up to date 😅.

In the last 4 quarters I've been tracking this, it's been ~1 credit per day among all projects. Last quarter I had credits at 1295 issues. As of now, it's 1376. So 81 new credits, vs 93 last quarter, which is a little below 1 credit/day.

Breaking those down:

Canvas: 143 (+61)
Core: 150 (+8)
CMS*: 42 (+4)
Dashboard: 61 (+3)

I also enjoy contributing to projects like DDEV, which helps me learn Golang and clear my mind from working on the same stack. Recently I've been working on Add --project/-p flag to ddev exec command to target a named DDEV project from any directory and it was just merged! 

And I've been pushing a bit this quarter to keep the Drupal Canvas development DDEV add-on up to date, with several improvements and releases.

Hope to write again before July 1st!

Happy coding! 🎉🎉

Tags

  • contributing
  • quarterly-report
  • Drupal
  • Drupal Core
  • Drupal Canvas
  • DDEV
By penyaskito , 10 November, 2012
Image
Penyaskito presenting in front of a blackboard full of math formulaes

Drupalcamp Spain 2012

On October 20th and 21st took place in Madrid the 3rd edition of the biggest Drupal event in Spain, Drupalcamp Spain 2012. On Saturday I participated on a panel with Pedro Cambra, Ramon Vilar, Juampy Novillo and José Reyero about how to contribute to Drupal, with modules, themes, translations, documentation, marketing, events... The slides we used as guide are available on Slideshare:

Contribuir en Drupal: Por dónde empiezo? from Christian Lopez

On Sunday, I made a session where I tried to explain the changes in multilanguage between Drupal 7 and Drupal 8, that will be a reality hopefully on August 2013. The slides are also available in Slideshare:

Multilenguaje en Drupal 8 from Christian Lopez

The videos of every session will be available soon at the Vimeo channel of the Spanish Drupal Association.

That weekend took place the first Assembly of the Spanish Drupal Association, where I was nominated as a Board Member. I hope to contribute with them spreading Drupal use in Spain.

And after a very busy weekend, a plane to Frankfurt. But that's part of another story.

Post image: Some rights reserved by Pedro Lozano

Tags

  • Drupal
  • Drupalcamp
  • Drupalcamp Spain
  • AED
  • multilingual
  • contributing
  • sessions
  • slideshare
  • Drupal planet
By penyaskito , 17 August, 2012

Remoting for the Drupalcon Munich D8MI Sprint

After participating on the Drupal Developer Days D8MI Sprint, I was very sad I couldn't assist to the Munich Drupalcon one, but I decided to participate remotely.

I asked for people who wanted to join me on the Sevilla Drupal Group, and Jesús Balsera (jsbalsera) and Juan Fernández (@Maxtorete) joined me.

We'll start today and will be sprinting until next Sunday, if everything goes well and nobody leaves (hope so). 

The focus on D8MI is set, and these are some notes I took about some issues that I'd like we collaborate with:

  • http://drupal.org/node/1733746 => D8 installer is broken if selecting a non-English language on installation => Drupal core, install system, normal, needs work, 3 comments, 1 IRC mention
This is a problem when installing D8 in another language. A patch is attached, but needs some work.
@penyaskito did the initial work.
@jsbalsera managed to fix the requested changes and use drupal_classloader_register instead of include_once. Other sprinters did more tweaks and it was committed :-)
http://drupalcode.org/project/drupal.git/commit/3f92626
 
  • http://drupal.org/node/1738178 => Javascript library localisation vs localization => Drupal core, locale.module, normal, fixed, 5 comments, 5 IRC mentions
Minor string fix, reported by @penyaskito.
http://drupalcode.org/project/drupal.git/commit/428226c
 
  • http://drupal.org/node/1392208 => Impossible to install Drupal in a non-English language when following the provided instructions => Drupal core, install system, normal, needs review, 12 comments, 2 IRC mentions
@Gabor & @penyaskito.
http://drupalcode.org/project/drupal.git/commit/ea5de2e
 
  • http://drupal.org/node/1637348 => Import Gettext .po files in progressive batches to avoid time limits => Drupal core, language system, normal, fixed, 28 comments, 15 IRC mentions
@penyaskito worked on this at Barcelona and has been completed now.
http://drupalcode.org/project/drupal.git/commit/7e79095
 
  • http://drupal.org/node/1658842 => Introduce a translations:// stream wrapper to access the .po file directory => Drupal core, language system, normal, needs work, 12 comments, 3 IRC mentions
@penyaskito working on it. NW.
 
  • http://drupal.org/node/1738330 => Confusing Language negotiation when accessing / => Drupal core, language.module, normal, active, 0 comments, 2 IRC mentions
@jsbalsera working on it
 
  • http://drupal.org/node/253157 => Add a new user permission "Translate own nodes" => Drupal core, translation.module, normal, needs work, 31 comments, 3 IRC mentions
Needs rerolling, functionality tests and upgrade tests.
@penyaskito rerolled it.
@maxtorete is writing functional tests. NW
 
  • http://drupal.org/node/1189184 => OOP & PSR-0-ify gettext .po file parsing and generation => Drupal core, locale.module, normal, needs work, 256 comments, 70 IRC mentions
Properly test this.
Minor follow-ups.
 
  • http://drupal.org/node/1632384 => Import available language data and translations form translation server => Drupal core, locale.module, normal, needs review, 13 comments, 5 IRC mentions
 
 
  • http://drupal.org/node/1627006 => Collect project information for translation update => Drupal core, locale.module, normal, needs review, 23 comments, 5 IRC mentions
Work started
 
  • http://drupal.org/node/1191488 => META: Integrate l10n_update functionality in core => Drupal core, locale.module, normal, active, 12 comments, 4 IRC mentions
This is a major issue broken into smaller pieces. Those ones needs care. Doesn't look specially easy.
 

Let's see what we can afford.

 

Tags

  • sprint
  • Munich DrupalCon
  • D8MI
  • contributing
  • Drupal
  • Drupal Core
By penyaskito , 5 August, 2012
Image
Penyaskito presenting about Contributing to Drupal at Emergya offices

Drupal Sevilla Talk: Contributing to Drupal

On last Wednesday, I participated at the August Sevilla Drupal Group monthly meeting, talking about my experience contributing to Drupal.

We walked through how to contribute translations, the modules and themes contribution approval process, how to report issues, how to contribute a patch and how you could become involved in the on progress Drupal Initiatives. We also did a quick review on what we can expect of Drupal 8.

The slides I used are based on Webchick's "One Drupal 8 Slide Deck To Rule Them All". For the reference, they are available on Slideshare: Contributing to drupal from Christian Lopez

I saved on Del.icio.us too a collection of the links we looked at.

Tags

  • Drupal
  • talks
  • contributing
  • Sevilla
By penyaskito , 5 August, 2012

OOP & PSR-0-ify gettext .po file parsing and generation

One year ago, a refactoring at the Gettext .po file parsing and generation started.

Finally, that issue has been fixed. I were working with Sutharsan, ClemensTolboom, GaborHojtsy and Attiks on this issue at the Drupal Developer Days sprint, and after the sprint we finally (well, mostly Gábor...) pushed forward to its completion.

The new design is something like this:

Gettext design

(Diagram by Gábor Hojtsy)

I'm very grateful for their help on being started on contributing to the D8MI Initiative, and hopefully I'll be working on more things into the D8MI sprint. Any help is welcome!

Tags

  • D8MI
  • Drupal Core
  • Drupal
  • contributing
  • commit
  • multilingual
By penyaskito , 14 June, 2012
Image
Table with sprinters at Barcelona DDD2012

Drupal D8MI Sprint: Day 3

So third day of the Sprint, with Peter, Clemens and I working on Gettext. It would be the last day for Clemens, so we expected to do great advances :-)

Day started great, and I don't get stuck like previous days with obvious things. We kept with the refactoring and finally core/includes/gettext.inc could be removed. w00t!

Thanks to Gábor's explanation we understood what was expected for the batch API part of this, so we are able of advancing on that, but maybe on another issue context. This one became too big and splitting it could be of help. Peter wrote some more integration tests, and I finished fixing plurals handling and cleaning up some methods. Thanks Clemens for your patience, and hope that we can advance without you in the next days!

Tags

  • Drupal
  • D8MI
  • contributing
  • sprint
  • Barcelona
  • initiatives
  • Drupal Core
  • i18n
  • patches
By penyaskito , 14 June, 2012
Image
An empty freezer with a paper says 404 Not Found

Drupal D8MI Sprint: Day 2

Ok, so I failed on Tuesday on updating the blog, but a quick summary.

Clemens and I kept working on the Gettext component on D8MI sandbox. I got a little lost and we had an Skype call in the morning were he explained me what he was expecting. We did some clean up and kept working on it. Some commits got into the sandbox, but lot of works still remaining. Fortunately, in the afternoon Attiks joined us, so more hands (and brain) on code!

Tags

  • Drupal
  • D8MI
  • contributing
  • sprint
  • Barcelona
  • initiatives
  • Drupal Core
  • i18n
  • patches
By penyaskito , 12 June, 2012
Image
Whiteboard from Drupal Dev Days Barcelona 2012 sprints

Drupal D8MI Sprint: Day 1

Today, the D8MI sprint started. Met the assistants.

At 10 am, Gábor introduced the multilanguage architecture for Drupal 8. It's composed of four layers, with the locale module at the base, and on top of it the UI, the content translation and the config translation. He presented the people responsible of each so we know who we need to talk for anything, and how we could work on his D8MI sandbox. After this, the presentation round where everyone exposed the areas he was interested.

As planned, I started helping out Clemens with the Gettext .po file generation.  The morning has been quite frustrating. I catched up with the comments, and saw that it was not an easy thing. Clemens and Erik have most of the issue already working, but some problems appeared when I tried to test it, and Clemens helped out to find the causes. We updated the summary accordingly. After that, I headed with some errors because of inconsistent naming of classes and its references, an issue that was not happening on Clemens' Mac computer. Fixing this was my first commit to the sandbox :D 

After dinner, work started to happen smoothly. Clemens was working with plurals and we discussed how the responsability of formatting those should be out of the PoItem object, and with his change on this implementation the tests went back to green :-)

After some silly issues that I had generating a git patch, I started to feel more confident. While Clemens update the issue summary for showing up the change of scope it had through the comments, I started to think on how to refactor PoDatabaseWriter. This should continue tomorrow.

Gábor is reporting the progress at this document: D8MI sprint report. The global balance of the 1st day is only one commit to 8.x, but it seems that code will flow better on next days. By now, it's being an awesome experience working with these folks.

Tags

  • Drupal
  • D8MI
  • contributing
  • sprint
  • Barcelona
  • initiatives
  • Drupal Core
  • i18n
  • patches

Pagination

  • 1
  • Next page
contributing

Monthly archive

  • July 2026 (3)
  • April 2026 (4)
  • August 2025 (1)
  • April 2025 (1)
  • July 2023 (1)
  • December 2021 (1)
  • May 2021 (2)
  • April 2021 (1)
  • September 2014 (1)
  • November 2012 (1)
  • September 2012 (2)
  • August 2012 (3)
  • June 2012 (6)

Recent content

Canvas Tips&Tricks: Declaring images in SDCs
3 days ago
Canvas Internals - JSON data types in different databases: It works on my machine!
2 weeks 2 days ago
Quarterly Contributions summary for 2026 Q2
2 weeks 4 days ago

Recent comments

That's a great idea! I would…
3 months ago
D.org integration
3 months ago
Can't blame you 😜For me…
3 months ago

Blogs I follow

  • Mateu Aguiló "e0ipso"
  • Gábor Hojtsy
  • Pedro Cambra
  • The Russian Lullaby, davidjguru
  • Can It Be All So Simple
  • Maria Arias de Reyna "Délawen"
  • Matt Glaman
  • Daniel Wehner
  • Jacob Rockowitz
  • Wim Leers
  • Dries Buytaert
  • arcturus
  • Drupal Core AI digest
  • Drupal CMS AI digest
  • Drupal Canvas AI digest
  • Drupal AI AI digest
  • Drupal Patterns AI digest
  • Trisha Gee
  • Très Bien Tech, by _nod
  • Moshe Weitzman
  • Drupal core change records
  • Ed Zitron's Where's Your Ed At
  • Sebastian Bergmann (phpunit.expert)
  • PHP Reads
  • mandclu
  • Marissa Epstein
  • WordPress Core
  • David Bushell
Syndicate

Footer

  • Drupal.org
  • LinkedIn
  • GitHub
  • Mastodon
  • Twitter
Powered by Drupal

Free 🇵🇸