Alphabetical sort of Search API results including multiple entity types

Alphabetical sort of Search API results including multiple entity types

On my Drupal 8 site, I am configuring a Search API search bar that uses a Search API Page that I’ve configured to include 3 entity types (Content, as well as 2 custom entities I have built). The search is working as expected. The Search API Page for my defined... read more
Alphabetical sort of Search API results including multiple entity types

Fatal error "Cannot redeclare template_preprocess_select()" on every attempt to install modules or themes

Fatal error: Cannot redeclare template_preprocess_select() (previously declared in /Users/ron/Sites/provgmc.dev/core/includes/form.inc:30) in /Users/ron/sites/provgmc.dev/core/includes/form.inc on line 37 This is not an issue with code I’ve written or altered.... read more
Alphabetical sort of Search API results including multiple entity types

Is there any option to add file upload/attachment field in webform?

Is there any option to add file upload/attachment field in webform for Drupal 8? My webform version is 8.x-5.0-beta7+20-dev read more
How can I set default value (prepopulate) for field in views exposed filter?

How can I set default value (prepopulate) for field in views exposed filter?

I’ve tried to use solution from Can I prepopulate an exposed filter text field? but failed. Cache clearing does not help. function mymodule_form_alter(&$form, &$form_state, $form_id) { if ($form_id == “views_exposed_form” &&... read more
Alphabetical sort of Search API results including multiple entity types

How do I programmaticaly get the name/ID of the shipping method for an order?

I need to get the name of the shipping method for a given order in my module. I have the id of the order. After I get the shipping info by means of... read more
Alphabetical sort of Search API results including multiple entity types

How do I rewrite a facet item label using facetAPI bonus?

I am looking at the code example provided by Facet API Bonus module in the section Rewrite facet items via callback function function HOOK_facet_items_alter(&$build, &$settings) { if ($settings->facet == “YOUR_FACET_NAME”) { foreach($build as... read more
How to display parent Taxonomy ID in REST export

How to display parent Taxonomy ID in REST export

I want to configure REST export View in which I display taxonomy term name, id and parent ID. How to insert parent taxonomy term id, why it’s not available in FIELDS? Here is current REST export settings, I only missing parent term ID. read more
Alphabetical sort of Search API results including multiple entity types

How do I add the noscript tag?

I’ve a drupal 8 website, where in every page, I would like to add a noscript tag for every script tag. In drupal 8, in html.html.twig, I saw the scripts variable in missing. So how do I do that in Drupal 8? read more
Alphabetical sort of Search API results including multiple entity types

HTML in data of theme_table()

According to http://www.drupalcontrib.org/api/drupal/drupal!core!includes!theme.inc/function/theme_table/8 I created a table in my custom page in Drupal 8. $build = [ ‘table’ => [ ‘#theme’ => ‘table’, ‘#header’... read more
Alphabetical sort of Search API results including multiple entity types

How to display the pager on top and bottom of a custom search results page?

I have used the core Search Page functionality in Drupal 8 to built a search engine on my site. The pager is displayed at the bottom by default. How can i display the pager on the top also? Note: I have not used views to built the search page. Thanks! read more
Alphabetical sort of Search API results including multiple entity types

Add an additional custom submit handler to default search api Solr view filter?

I would like to run an additional submit handler every time a user searches a term with the default view filter provided by the search_api_solr module. Here is my form altering code: /** * Implements hook_form_FORM_ID_alter. */ function... read more
Date field exposed filter – select year

Date field exposed filter – select year

Back in Drupal 7 I’ve created exposed filter with Year from date field. (Selet list). View all 2017 2016 2015 etc… And when creating such filter we had options like on this picture: BUT, now in Drupal 8 I cannot see that is supported. I’ve installed... read more
Alphabetical sort of Search API results including multiple entity types

Execute jQuery after form submit

I have a non-ajax form for which I’m trying to execute a jQuery function after the form has been submitted and processed. I don’t need ajax for the form, but I do need to wait until 600 odd form fields have been processed before executing my jQuery... read more
Alphabetical sort of Search API results including multiple entity types

How to specify entity reference fields when programmatically submitting to user_register_form

You’d think this would be easy. I’m calling drupal_form_submit(‘user_register_form’, $form_state) to automatically register users after they have completed filling out a Webform. But I have some Entity Reference fields in my user profile and... read more
Alphabetical sort of Search API results including multiple entity types

Why are my webform conditionals not always working?

We have 2 partially same webforms with conditional fields, opening a number of components depending on the selection with radio buttons. When logged on as administrator, both forms work fine. when logged on as simple user, only one webform all works fine, the other... read more
Alphabetical sort of Search API results including multiple entity types

How to do push data to datalayer after Ajax callback?

I have a view with many elements and use views load more -> view using views load. Modules: Views Load More. dataLayer. Is it possible send datalayer event after load elements with AJAX? I am tracking with Tag manager (Google). read more
Alphabetical sort of Search API results including multiple entity types

How to change background image based on current node?

I am trying to change the header background image of my website based on the current node. I have added an image field to my content type, field_hero_image, and, in preprocess function mytheme_preprocess_page(&$variables), I get the image url and try to inject it... read more
Alphabetical sort of Search API results including multiple entity types

Views aggregation, sum of node count in _each row_

I have a View that uses aggregation to count the number of nodes of a custom color type. For example, there are 10 red nodes, 10 green nodes and 20 blue nodes. For each color, I would want it’s node count and the total count to show up on each row, like this:... read more
How to enable plain text format for body in specific content type

How to enable plain text format for body in specific content type

I have one content type, where I want to restrict the body field to plain text only. In Drupal 7, there was an option to set the plain text format explicitly in field configuration; however in Drupal 8, there is no “plain text” option in the select box. I... read more
Alphabetical sort of Search API results including multiple entity types

Views CSV export, not exporting complete data

I have one CCK field called “Questions” with type “Long text”. I’m trying to export this value using views data export in CSV format. Below is the text to export. Some text, trying to export. While export in CSV, I have got only partial... read more