This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

[Advice] Consume JSON:API Data, Save and Display

Hey Drupal Developers,

I have recently taken up a task to do the following:

  1. Set up a custom module
  2. Consume an API once a day
  3. Save it to the database
  4. Retrieve the data and display where ever necessary

Attempt 1:

  • I created a custom block.
  • Overided the block in the theme, e.g block--block.html.twig.
  • Added JS to fetch and customized the data to suit.
  • The realized I had no way to save it or access the Drupal API to save the data.

Attempt 2:

Way to query all nodes that use a specific paragraph field?

I am trying to find all nodes that use a specific paragraph field (populated) in order to replace each instance with a different field type. Can't seem to be able to get what I need with a view and I'm not quite sure if I can get to where I need in the db. Any suggestions on a way to get them in a hook/twig?

Getting Ajax error : "data-error-switching-to-ckeditor5" in Drupal 10

Hello,

I'm currently working on a module and having the folowing error

"data-error-switching-to-ckeditor5"

This error happens when I am in a "text and format editor" and when I do one of the following : 
- Add/Remove the the module icon from the toolbar
- Click on the module checkbox in the "Enabled filters" area
- Switch the "Text editor" between CKEditor5 and none

The code worked fine on drupal 9.5 with CKeditor but going to drupal10 with CKEditor5 raised this error

How to access a page/resource of one domain from another domain(CORS request)?

I have tried to include an iframe (For example:- with src="domainA.com/page1") in Domain B for accessing a page of Domain B.

But I got an error that Domain B has been blocked by Domain A due to CORs policy.

I tried to possibilities:-

 1) I have included domain B in the settings.php of Domain A as a trust_host_pattern and hence that error was not showing now.

But still I am not able to access the page, which I tried to access using iframe.

2) I have tried to enable CORs settings in sites/default/services.yml like below:-

General question about layout canvas acquia

Hello,

I'm using Acquia site studio, and I don't have much experience.

Tip: Free PhpStorm license for +35 Drupal issue credits over the past year

Just a tip, if you didn't know: Drupal contributors with 35 or more issue credits gained over the past year can get a free PhpStorm license. See Free PhpStorm license for Drupal contributors.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions