New answers tagged

1

In DateTimeNormalizer, the inferface format is RFC3339, which is Y-m-d\TH:i:sP as an input format string. It also accepts the ISO8601 PHP string, which is Y-m-d\TH:i:sO Try using strings like in your request '2020-02-20T13:15:00+01:00'. What I suspect is happening, is that since you aren't specifying the UTC offset, it is being interpreted as '+00:00' ...


0

The main difference is the authentication and authorization, is Rest Solution you should provide different way to authentication and authorization to access to the endpoint. but in Controller,route solution is MVC base solution that drupal and it's ACL ( role and permissions) hanle the access to the results not REST authorization methods like basic_auth, ...


0

Make sure you check the correct permissions for the roles you want in the "RESTful Web Services" section on the /admin/people/permissions page.


0

So I finally found the culprit. A php symlink in the bin directory linking to an old version of php. I guess even though drush showed it was using version 7.3, those scripts used that symlink and was pulling in an older php version. Error is gone and I can finally update through drush.


3

You can change the JSON output of a date field by implementing a custom Normalizer for date fields in a custom module. I got it to work using the following code. This is a bit of a hatchet job, so you'll want to clean up and stuff, but otherwise it should do the job: /src/Normalizer/DateTimeCustomNormalizer.php: <?php namespace Drupal\...


Top 50 recent answers are included