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

Search API Attachment in Content View

Hi,

I have successfully used the Search API Attachment to index PDFs,

and have created an Index View for searching it.

I am wondering if it is possible to apply this filter to an existing Content View?

Mismatched entity and/or field definitions after upgrading to Drupal 10

I recently did an upgrade of my website from Drupal 9.5.10 to Drupal 10.0.11. But my Status page reports following error:-

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.

Content

  • The node.field_date_time field needs to be updated.
  • The node.field_event_date field needs to be updated.

Using drush to automate creating and saving block content

Running Drupal 10.5. Is it possible to use drush to automate creating block content, saving in the database, assign it to a region and have it displayed?

I have found information how to create new modules on line but being a newbie this seems to be different from creating content, store it in the database, assign it to a region block to have it displayed, all using drush.

Thanks in advance.

Store a page in cache for all the authenticated users with a specific role

For the moment, each authenticated user generate a specific page cache (node entity) when he navigate on the website. 

Is there a possibility to use the same cache page (news node) for all users with a specific role (eg editor) ?

Do I use the cache_api for this ?

Thanks for yours examples and replies.

How to add summary, avg, min to selected view display programmatically

I created a new types of content (import) to which it imports data from CSV files. 
This node contains the field (field_result) in which the value is stored.
I added views that displays all nodes in the form of a table.

I want to add programmatically three rows to the view: sum, average and min

Now the table looks like this:

| Node name | field_result
------------------------------
| node1         |  3
| node2         |  5
| node3         |  2
 

How to suggest template for nodes with added external data

I have nodes with puzzles. I store extra info on the puzzle (say puzzle_sol) in a different table. I add this extra info to node in 'hook_node_storage_load' in my module. I then attach a special library to the page in page_attachments hook. There I use the above extra info to decide whether to attach the library or not. (if puzzle_sol was added, then attach the library ... else not)

This whole strategy is working without absolutely any issue.

Now the problem.

Pages

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