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

Get the list of all display IDs of a view

Hello All,

I'm doing some custom development involving the Views Class (https://api.drupal.org/api/drupal/core%21modules%21views%21src%21Entity%21View.php/class/View/8.5.x) for a small project.

I've created a view programmatically, and it has a couple of displays, besides "default": block_1 and page_1. It could have more displays in the future, it depends of the user's requirements.

Adding anonymous user authentication to rest resource POST API

Hi Team, 

I have created a rest Resource POST API that will post some content to my application(from frontend created using angular js) that further needed to be stored in DB. Now I need some way to authenticate the anonymous user that fills out the form. 

How I created the POST API: 
https://valuebound.com/resources/blog/how-to-create-custom-rest-resources-for-post-methods-drupal-8

LogicException: The database connection is not serializable.

Hi,

Im not sure if anyone else has got this error or not, but when I try to perform a validation $form_state->setErrorI am getting an error 

LogicException: The database connection is not serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Adjust your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connection->__sleep()

Taxonomy Auto Parent when choose Child Term

Hi.

I have a node type called article, with a enety reference field to the catagory taxonomy term.

The catagory looks like this:

Car Parent

- Car Child 1

- Car Child 2

- Car Child 3

The node shoold automaticly have term Car Parent when I choose a Car Child term.

It makes does not make sence to me that I should make an extra click to coose the Parent term.

Hope somebody can help. Doesnt find a solution here in drupal 8.

Custom XML export, apply XSL

I have a view with REST export to XML up and running. The format though is not consumable by the service it is intended for.

I have a very simple XSL that makes the output compatible. Can I write a module that takes the view output and applies the transform?

Thank you in advance

YML support for Defining 'type' attributes in 'script' elements

custom javascript is added through twig {{attach_library()}} tags, and libraries containing '.js' files are defined inside of THEME.libraries.yml settings files, so it seems that the YML file would be the best place to define attributes for a script tag, most specifically,
<SCRIPT type= "text/javascript"></SCRIPT> ' attributes

is there support within the YML files for defining the 'type' attribute?
  If not, can it be called within the attach_library() twig call?

Pantheon returns this script error when instances are in 'GIT' mode exclusively

Pages

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