Account created on 23 August 2009, over 15 years ago
#

Merge Requests

More

Recent comments

🇺🇸United States m.stenta

Merge request ready for review!

I also noticed that "client_id" was misspelled in config/install/farm_farmlab.settings.ym so I fixed that in a second commit in the same MR.

🇺🇸United States m.stenta

I created a farmOS Integrations module: https://www.drupal.org/project/farm_integration

And opened a merge request that adds FarmLab to the Integration menu (with a dependency on the module).

This is a breaking change (new dependency), so it will require a 2.0.0 release.

🇺🇸United States m.stenta

m.stenta created an issue.

🇺🇸United States m.stenta

@dmitry.korhov It isn't the getSupportedTypes() method that's at issue, it is the normalize() method.

See this commit in the MR: https://git.drupalcode.org/issue/jsonapi_schema-3431487/-/commit/7f424f1...

(Originally cherry-picked from 🐛 PHP8.3 compatibility issues Active )

This is the fatal error that it fixes:

Fatal error: Declaration of Drupal\jsonapi_schema\Normalizer\DataDefinitionNormalizer::normalize($entity, $format = null, array $context = []) must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize(mixed $data, ?string $format = null, array $context = [])

Is there a way to support that in Drupal 10 and 11? I would be happy to adjust the MR if there is, but if not then I think this is the best we can do.

🇺🇸United States m.stenta

The 4.x branch is officially open! I created a 4.x-dev release, so now we can categorize issues accordingly.

🇺🇸United States m.stenta

This seems to be a bug with MySQL: LIMIT clause results in duplicate data across pages

We run Drupal on PostgreSQL and it is also an issue in that context.

We have been consistently hearing about it from API users of farmOS , and we just tell everyone to add a ?sort=drupal_internal__id to their queries. We do this automatically in our farmOS.js and farmOS.py API libraries to save our users the headache and head scratching when they can't find records in the API endpoints or find duplicate records.

But this really should be fixed in core IMO. This is a major bug with the jsonapi module in my opinion, and it is not documented anywhere.

🇺🇸United States m.stenta

@dmitry.korhov See my comment #10 above.

Drupal 11 upgrades Symfony from version 7, which changes the method signatures in Symfony's NormalizerInterface. I think this means we need to drop support for Drupal 10.

🇺🇸United States m.stenta

Thanks @nununo! We have an existing feature request open for this: [#]

I've copied your description into this comment for reference: https://www.drupal.org/project/farm/issues/2786107#comment-16073247 Option to filter assets by area AND include child areas Active

Closing this as a duplicate.

🇺🇸United States m.stenta

A similar request was made for this, so I'm going to close it as a duplicate of this, but copy over the description for reference:

Problem/Motivation

I would like to be able to list which Plants are in a particular bed, but also which Plants are in a particular Field, since my Beds are hierarchically grouped under Fields.

I guess this functionality could probably be available in all kinds of Assets, even though I need it specifically in Plant assets.

Steps to reproduce

When I go to page Records > Assets > Plant, I can filter by a lot of different fields like Name, Season, Crop/Variety, etc. But I cannot filter by Location.

Proposed resolution

Implement the functionality to allow the filter to also take Location into consideration and make the field available in the filters form. Also, bear in mind that, ideally, this filtering should be done recursively: report all Assets that are at a given Location but also all Assets that are at locations that are children of that given Location.

🇺🇸United States m.stenta

I opened a PR that changes how we maintain CHANGELOG.md moving forward: https://github.com/farmOS/farmOS/pull/948

I also started a draft PR for starting an official 4.x branch: https://github.com/farmOS/farmOS/pull/949

Once we merge that, then we can push it to https://git.drupalcode.org/project/farm and create a 4.x-dev snapshot, which will allow us to start referencing that version in this issue queue.

🇺🇸United States m.stenta

Discussed this on the farmOS dev call today. We will probably just make the changes to the farmOS (and Log module) plugins in the 4.x-attributes branch, rather than trying to get it into 3.x.

🇺🇸United States m.stenta

There is a draft PR for a Rector rule that automates this conversion here: https://github.com/palantirnet/drupal-rector/pull/308

🇺🇸United States m.stenta

I'll reverse that commit and see if it makes any difference. First look is that it's only the category name that has changed. Hard pressed to think that would make a difference.

That was my thought too, but maybe the category gets used somewhere along the way. Just a guess...

🇺🇸United States m.stenta

@elc What version of Drupal core and Fraction are you using?

I wonder if this change has anything to do with it?

https://git.drupalcode.org/project/fraction/-/commit/f34523b9fe859f80745...

That is the only substantive change to the 2.x branch since January.

Key to it is that $field->field_alias == 'unknown' for all of the Fraction fields in a view. That was causing the complete failure of what this patch was doing.

Otherwise, I wonder if something changed in Drupal core / Views that could explain the new behavior you're seeing. 🤔

🇺🇸United States m.stenta

I have tested and updated the merge requests for both of the contrib module's we're waiting for:

With both of these in place, I was able to successfully install farmOS 4.x on Drupal 11 in my local dev environment! 🎉

There were a bunch of new PHPStan errors, so I fixed those as well. PHP CodeSniffer and Rector are both clean. I have not run automated tests yet (it will be easiest to do that via GitHub Actions).

I will rebase and push all my 4.x-* branches to my GitHub fork once we release 3.4.4. Then we can consider if we're ready to start an official 4.x branch and start opening PRs against it.

🇺🇸United States m.stenta

Pushed a commit that fixes the /api/[entity-type]/[bundle]/resource/schema routes.

This Drupal core change record describes the change that was necessary: https://www.drupal.org/node/3359695

Back to Needs Review!

🇺🇸United States m.stenta

The root /api/schema endpoint and collection endpoints (/api/[entity-type]/[bundle]/collection/schema) seem to be working.

🇺🇸United States m.stenta

Not working yet...

I tried to view a schema endpoint (/api/[entity-type]/[bundle]/resource/schema) in my browser and the following error occurs:

Uncaught PHP Exception Symfony\\Component\\Serializer\\Exception\\NotNormalizableValueException: "Could not normalize object of type "Drupal\\Core\\Field\\BaseFieldDefinition", no supporting normalizer found." at /opt/drupal/vendor/symfony/serializer/Serializer.php line 181
🇺🇸United States m.stenta

Opened a merge request with @volha_si's commit from 🐛 PHP8.3 compatibility issues Active (I updated the commit message to be more descriptive of its purpose, but kept the author credit).

I also added a commit that drops support for Drupal 8, 9, and 10. So this will need to be a new major release (not on the 8.x-1.x branch) - pending @bradjones1's response to my question above (#10).

I will do more testing locally and report back if I find any other issues.

🇺🇸United States m.stenta

Thanks @volha_si!

Quoting myself from 📌 Automated Drupal 11 compatibility fixes for jsonapi_schema Needs review :

This error is actually a result of changes in the upstream Symfony class that we extend from. So I don't think it's specific to PHP 8.3.

We can probably close 🐛 PHP8.3 compatibility issues Active as a duplicate of this issue, and incorporate the MR changes into here. I'll start a new MR and cherry-pick them over.

I'm going to close this as a duplicate and see if I can incorporate your changes into 📌 Automated Drupal 11 compatibility fixes for jsonapi_schema Needs review .

🇺🇸United States m.stenta

@m.stena Probably related to this: https://www.drupal.org/project/jsonapi_schema/issues/3504440 🐛 PHP8.3 compatibility issues Active

Thanks @alexander-tallqvist!

This error is actually a result of changes in the upstream Symfony class that we extend from. So I don't think it's specific to PHP 8.3.

We can probably close 🐛 PHP8.3 compatibility issues Active as a duplicate of this issue, and incorporate the MR changes into here. I'll start a new MR and cherry-pick them over.

🇺🇸United States m.stenta

Fatal error: Declaration of Drupal\jsonapi_schema\Normalizer\DataDefinitionNormalizer::normalize($entity, $format = null, array $context = []) must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize(mixed $data, ?string $format = null, array $context = [])

I think fixing this is going to necessitate dropping support for Drupal 10.

@bradjones1: I see that you have started a 2.x (and 2.0.x) branch that makes some of these changes already. Should I base a MR off of one of those? I can't find any mention of them in the issue queue, and there are a number of other changes. Any guidance you can provide on your intentions would be appreciated! I want to help push this forward, but don't want to step on toes or duplicate efforts.

🇺🇸United States m.stenta

I tested installing on Drupal 11.1.5 and it failed with the following error:

$ drush en jsonapi_schema

Fatal error: Declaration of Drupal\jsonapi_schema\Normalizer\DataDefinitionNormalizer::normalize($entity, $format = null, array $context = []) must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize(mixed $data, ?string $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null in /opt/repos/jsonapi_schema/src/Normalizer/DataDefinitionNormalizer.php on line 53
 [warning] Drush command terminated abnormally.

I had to fix this in farmOS as well, so I'm familiar with the solution. I'll work on this...

🇺🇸United States m.stenta

Thanks for testing @onfire84 and @alexander-tallqvist.

Let's get confirmation that this works on Drupal 11. Setting back to Needs Review.

🇺🇸United States m.stenta

Rebased onto 11.x.

The biggest change was to move the node and taxonomy hook implementation changes to Hook classes, since 📌 [ignore] Convert everything everywhere all at once Active was merged.

Also attached (and hidden) is a patch that works with 11.1.x, since that has some slight differences, and is useful for applying to the current stable release (11.1.5) via cweagans/composer-patches.

🇺🇸United States m.stenta

I wonder if we should consider deprecating the Asset/Log/Plan/etc events, and just recommend using the core hooks as intended.

🇺🇸United States m.stenta

I opened this related issue, which IMO we should tackle first: 📌 Convert all procedural hook implementations to Hook classes Active

Postponing this issue, but let's review it in more detail to see if there's anything we can work on or plan for in the meantime.

Production build 0.71.5 2024