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

THIS FORUM IS NOT FOR "What module..." or module support questions-- it's for module development and code related questions.

The module development and code questions forum is intended to aid those who are developing modules or writing code for Drupal.

Please note that this forum is also not intended for "Is there a module that does..." or "I need help with module x..." questions. It's also not a place to ask developers to write your code for you. Please respect this.

Please do not post general discussions intended to target module developers. If the question you have isn't specifically related to writing a drupal module, please post it in a more appropriate forum.

  • If you you have drupal installed already and are seeking a module that does a specific task, have a question about a specific module and what it does or if it will fit your use case, please place your questions in the Post installation forum.
  • If you have a problem or question about a specific module, you should create an issue in the module's issue queue (after checking for an existing issue first).
  • If you don't have drupal installed yet, please place your questions in the Before you start forum.

Need some help with a simple dependency injection

I'm sure I must be missing the obvious - been staring at this for way too long, and am about to pull my hair out lol.

I am trying to inject a dependency for the database connection into a block class. Here are the relevants:

Slides are not loading on subsequent pages after core update

So I had this problem earlier and found a solution.
Unfortunately it does not work anymore after the core update to 7.50 (I did not override the site files).
Any ideas?

Ajax form drupal_render_children()

Hello :)

I'm looost with this Drupal stuff ^^

Trying to ajaxify a search field to reload my homepage according to this filter.

But I don't have any value returned, no data on my homepage while playing with this filter.

BUT I can see the value "libelle" as the good result with the function drupal_render_children()

I really DON'T understand!

Hook_menu:

Issue with context filter for multiple values in Drupal 8

Hi,

I have added a field in context filter and checked "Allow multiple values". The field is actually a custom field (not a taxonomy term), which was added to a content type. Now the filtering is working fine ONLY when I pass 2 values as "OR" condition (val1 + val2). But the filtering is failing when applying "AND" condition (val1, val2). The "AND" condition also gives the same result as the "OR" condition.

Will it be a context filter configuration issue or a bug in Drupal 8? Please advice, if someone has faced a situation like this and found a solution for it.

Adding an image field using hook_schema()

I have a use case wherein I want to create a custom table using the hook_schema() function which will have a couple of image fields. Now, I want to prefill some data into this custom table. How can I go about creating an image field for my custom table, and then inserting an entry with an image in it so that the image could be displayed using a query on the front end?

PS: I'm using Drupal 7. Also, I do not want to use the node system or CCK fields for this use case.

Pages

Subscribe with RSS Subscribe to RSS - Module Development and Code Questions