Add product (commerce module) using REST API

Hi all, using Drupal 8.8.2 I'm trying to add a product (module commerce v. 8.x-2.17) using REST API, but I have problems

including variation and store. The error I get is somthing like "validation failed", "stores" and "variations" cannot be null

Is there any working example ? I've seen lot of questions about Commerce and API, but no answer about POSTing

a new product: maybe it's not possible ?

I'm also trying with JSON:API Extras, but no luck

Thank you

Marco

How to display URL of $var['elements']['field_image']['#blazy']['_uri'] ?

Hi there. I need to display the URL of this field:

$var['elements']['field_image']['#blazy']['_uri']

In a href attribute in a Twig template. The template is working (image.html.twig -> modify the image field) but I can't display the URL.

I'm doing my best but I really don't know how to do it. Maybe I need to modify another template.

Thanks for your time.

How to change default language?

I installed Drupal in English. I made my website in Polish. All content is in Polish. I would like to make an English version now. I installed the Polish language and set the site's default language. I would like to translate the content into English now, but Drupal thinks that my site is in English and I only have the option to translate it into Polish, even though the content is already in Polish. Also I want Interface in English, but when I swiched default language in Polish my Interface is Polish too. How to change that?

Using a literal string in #attributes

I'm using JavaScript from DataTables.net to provide some fancy styling on longer tables full of search results from a module I'm working on. My table definition is as follows:

Drupal 8 module triggering error

I'm writing my first Drupal 8 module and on top of that my OO-fu is very weak. I've created a skeleton module and it works fine. Where I'm running in to problems is trying to make an admin page for settings. I'm using this as my guide: https://befused.com/drupal/drupal8-admin-form-guide. When I clear the cache, I get the following error in the logs "Error: Unsupported operand types in /var/www/html/drupal_2020/core/lib/Drupal/Core/Routing/RouteBuilder.php on line 163".

Translation Files missing (8.8.3)

I just upgraded Core to 8.8.3 from 8.8.2. My site language is German. Now I get the message that translation-files for English are missing for 70 projects, eg. 

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x