Sort the entity obtained from the Query class with values from the Statistics module

Sort the entity obtained from the Query class with values from the Statistics module

I am using the following code to sort the published nodes basing on the value stored from the Statistics module. $query = Drupal::entityQuery(‘node’) ->condition(‘status’, 1) ->range(0, 5) ->sort(‘totalcount’,... read more
Sort the entity obtained from the Query class with values from the Statistics module

Why doesn’t my custom OutboundPathProcessorInterface work anymore?

I wrote my own implementation of OutboundPathProcessorInterface to rewrite the URL of nodes to use the content of their field_project_url field. namespace DrupalmymodulePathProcessor; use DrupalCoreRenderBubbleableMetadata; use DrupalCorePathProcessor; use... read more
Sort the entity obtained from the Query class with values from the Statistics module

How do I make theme suggestions for pagers?

I am trying to create theme suggestions function for pagers in my *.theme. Is this possible in Drupal 8? If it is possible, what is wrong with the following code? Is suggestions_pager_alter the right way to access the hook call so I can add a theme suggestion to a... read more
Sort the entity obtained from the Query class with values from the Statistics module

Set a boolean (single on/off checkbox) value while creating a node

I am creating a node (in Drupal 8) with the following code. use DrupalnodeEntityNode; $node = Node::create([ ‘type’ => ‘calendar_data’, ‘title’ => ‘testing finaly 1111111111111111111111111 ‘,... read more
Sort the entity obtained from the Query class with values from the Statistics module

Entity Browser in Forms API

I’m having trouble getting the entity browser widget to work correctly in a custom form. Just wondering if anyone has had any success in getting it working. I’ve got to the point the button is rendering, you can use the browser, select the media. The the... read more
Sort the entity obtained from the Query class with values from the Statistics module

"PHP Fatal error: Call to undefined method ConsolidationAnnotatedCommandHooksHookManager::getHookOptions()"

I just installed drush using “composer require drush/drush”. It ran correctly and when it completes a navigate to vendor/drush/drush/ directory where the drush.php file is located Then I run the following command: php drush.php status and I get the... read more
Render Custom Menu Block from Menu Tree Array of Links Programmatically

Render Custom Menu Block from Menu Tree Array of Links Programmatically

Here’s what I have: A custom menu (side nav) that mimics the main/secondary menu tree which shows the entire subtree of the root menu item (Dine, Play, Stay) you’re under. This sidenav can be shortened with a checkbox field in the content type. If checked,... read more
Sort the entity obtained from the Query class with values from the Statistics module

Cannot import Paragraph based Feature into new site

Perhaps someone with a bit more Features expertise can help me here. I have a Drupal site with 25 or so Paragraph types that I would like to export (one by one) to its own contained Feature. I installed the latest version of Features, and created a new bundle called... read more
Sort the entity obtained from the Query class with values from the Statistics module

Access A Referenced Node’s Fields – Field Level Templating

I have a content type with a reference field to another content type. This allows an unlimited amount of entries. I’ve created a template for this field: field–node–field-my-fields.html.twig I want to be able to access the fields of my referenced... read more
Sort the entity obtained from the Query class with values from the Statistics module

Upgrade drupal commerce kickstart

I’m trying desperately to update a customer’s e-commerce site. I am a novice in Drupal. Drupal version: 7.18 Drush version: 8.1.10 Install profile: commerce_kickstart I checked with Drush for security updates: drush up –security-only Name Installed... read more
Sort the entity obtained from the Query class with values from the Statistics module

Condition on current moderation state

I would like to show a message when content has changed moderation states from review to published. I set this up below but it does not work. Is there a rules debug log in Drupal 8? Event: When content is update. Condition: Data Comparison. node.moderation_state... read more
Sort the entity obtained from the Query class with values from the Statistics module

how Drupal refresh/rebuild its route automatically after route programmaticaly created?

I try to understand how Drupal Core rebuild the route automatically after route created programaticaly. here is one example that i tried: I’m installing External Entities Module. this module will allow you to create entity and generate its route automatically.... read more
Sort the entity obtained from the Query class with values from the Statistics module

Aggregated CSS & JS files revert to old version

I’m troubleshooting an odd issue on my Drupal 7 site where it seems that old versions of our aggregated CSS & JS files are used some amount of time after a cache clear. How this is playing out is that I’ll make some update to our CSS or JS, then clear... read more
Sort the entity obtained from the Query class with values from the Statistics module

Wich template to override for user account form

I am building a theme for my Drupal 8 site and I want to create a custom profile page with user information like this: http://bootsnipp.com/snippets/featured/profile-card but I can’t find the correct template to override where I can have access to all the... read more
Sort the entity obtained from the Query class with values from the Statistics module

Multiple Different AJAX Enabled Forms on the Same Page

I currently have a form that is being loaded by AJAX and is working perfectly. I now need to add a second form (Add Single Stat) to the same page via AJAX as well. The Add Single Stat form is being loaded to the page perfectly but when the AJAX callback is fired for... read more
Sort the entity obtained from the Query class with values from the Statistics module

Translate the allowed values list of an entity access field?

I have a field of type: Entity access field. In my allowed values list I have: public|Public community|Community I have all of the core translation modules enabled: Configuration Translation Content Translation Interface Translation Language I cannot find where in the... read more
Sort the entity obtained from the Query class with values from the Statistics module

Set pager none in a view programmatically

I want set pager none in a view programmatically, but I can not find a way to do it, the object “$view” does not seem to exhibit a way read more
Sort the entity obtained from the Query class with values from the Statistics module

Display HTML field

I am using Views Database Connector to display safe data from external database in Drupal 8 within views. Some of the fields include simple html like a list which views encodes in html entities. I am using {{ fields.myfield.content }} in... read more
Sort the entity obtained from the Query class with values from the Statistics module

Is there a way to avoid CkEditor is used for some form elements, for example the body form element used for nodes?

I enabled the CkEditor module, which is now affecting all the form elements with a summary and a input format fields. Is there a way to avoid CkEditor is used for some form elements, for example the body form element used for nodes? read more
Sort the entity obtained from the Query class with values from the Statistics module

How can I query and order nodes with multiple date field values within a specific range?

I’m trying to get nodes that have date fields (multiple instances in some cases) and display them sorted ascending by start time for a given date. For illustrative purposes, here are some events and their date field values (start time). Event A 4/2/17 8:00AM... read more