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

Set custom field on term save

Hi,

I've set a custom field on a term as "field_code" and I want to automatically set it to the field "name" 's value if not set (on term edit/add form)

I've created a custom module and created a callback on submit

language_selection_page redirects without displaying anything

Language selection module 8.x.2.3. I have 2 languages enabled, each setup with it's own url /en & /fr. The detection and selection has the correct order

 URL > Cookie > Language Selection page > Selected Language

The standalone template has been set and the html--language-selection.html.twig page created from html.html.twig.

When I visit the site www.mysite.com/language-selection it immediately redirects to the front page mysite.com/en.

Module uninstall- what data is removed

In drupal8 one cant disable modules - you have to remove them and along with it the data.

i want to remove the contact module since it doesn’t appear to work well - but is there anyway to figure out what precisely the data is that it will be removing??

more generally is there a way to figure out what data a given module creates and manages??

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?

Pages

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