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

Search Access backed by Search API Solr

Hi, 

I have a site which has search functionality powered by Apache Solr . I am using search API for integration . 

The problem is Solr server generally goes down after few days , If I give permission to anonymous users to use search functionality ( View permission seat to Anonymous)

If I restrict the usage to Verified users then solr server stays stable . 

I feel spammers are firing many queries if search is open and bringing down solr . 

What could be the possible ways to solve this issue . I want to keep the search open to anonymous user. 

Get username in an Article

Hello everybody

I'm really new to drupal, so here's my newbie question,

I Just would like to write an Article that contains the username (Johndoe) to get something like :
 

Hello Johndoe, this article is for you

Is that even possible ? 

really sorry for this dumb question

FarmOS for Country of Georgia

We really liked your FarmOS project for medium and small farms in the Country of Georgia for implementation at the national level - we are planning to add certain functions and some changes in accordance with the needs of Georgia. We need to find developers team for applying changes to FarmOS v2 after we will clarify requirements according to country needs will be done 

If you are interested, please contact me by email at christine.jojua@gmail.com

Localhost accessing REST/JSON API can only see Anonymous Content

Background:

  • Setup: Drupal 8.9.17, with latest windows XAMPP stack PHP 7.4.11, and React.js
  • Project: Building a progressively decoupled site integrating REACT.js for various UI and page functions.

is there a way to invalidate cache for published or promoted content

Hello,

I am trying to invalide cache when a node is updated using a hook_node_presave:

/**
 * Implements hook_node_presave().
 */
function mymodule_node_presave(NodeInterface $node) {
  $tags[] = 'node:' . $node->id();
  Cache::invalidateTags($tags);
}

The reason I am invalidating the content is because I have query that is running under a template file in order to get and display the top 5 most recent content. Everything works as expected for any updated content.

Error in 'hook_email_registration_name ()'

I want to use Email Registration so that my username is also my email address.

function custom_username_email_registration_name($edit,$account) {
  return $account->mail;
}

But I get an error.

ArgumentCountError: Too few arguments to function custom_username_email_registration_name(), 1 passed and exactly 2 expected in...

How can I solve it?

Pages

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