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

How do you query solr server from php in Drupal 8?

I have installed search_api, search_api_solr and search_api_attachments. Also have Solr v.8.4.0 installed.

I installed php SolrClient for Centos 7 following this guidance: https://stackoverflow.com/questions/22959330/fatal-error-class-solrclient-not-found , but I still get "Class 'SolrClient' not found" every time I run

ContentEntity Caching (disabling)

I am trying to turn off entity caching for a custom entity in 8.7.3. This is an existing entity if that matters. Described via:

 * @ContentEntityType(
 *   id = "shift",
 *   label = @Translation("Shift"),
 *   base_table = "scheduler_entity_shifts",
 *   entity_keys = {
 *     "id" = "id",
 *     "uuid" = "uuid",
 *   },
 *   static_cache = FALSE,
 *   persistent_cache = FALSE,
 *   translatable = FALSE,
 * )

I added the last 3 lines. I have added a hook:

Hiding a site page from solr search results

Trying to find a simple way to add via hook possibly within mymodulename_search_api_solr_search_results_alter to hide a specific site page from internal search results. I'm finding suggestions for modules but is there a simpler way to hide a page?

Save a blob file in database.

How to save a text file in database by taking input through form?

Using taxonomy exposed view filters ends in MySQL can only use 61 tables in a join

Scenario

Site building:

  • Taxonomy: Vocabulary 'Countries' (around 300 terms, one for each country).
  • Content type Office: with a taxonomy reference field to Countries, so you can tag an office with a country.
  • View: showing Offices with an exposed filter on Countries taxonomy.

Front:

  • In the view's page, you filter by 100 countries to get the Offices in that countries.

Result:

Programmatically write contents in a file and download the file as pdf.

Hi,

I have to merge contents from few nodes and write them in a file. I have to then download the file as pdf. Everything needs to be done programmatically. 

I have searched for examples to help me with it, but have not found any helpful ones.

Could you please let me know how to write the contents in a file and then let a user to download the file as pdf?

Thanks,

Pages

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