All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
408 views

How to get menu tree from a node to build a customize breadcrumb?

I would like to build a custom breadcrumb based on node relation from entity reference. For example there is a book node that has menu hierarchy: Book |-chapter 1 |--sub chapter 1.1 |---sub sub ...
0
votes
0answers
6 views

Make a new Entity browser for PDF uploads?

Client has a custom Content Type for for downloadable PDF document detail pages, which contains an entity reference to the File media type. They want Full and Teaser view modes to display a thumbnail ...
0
votes
1answer
339 views

$node->toArray() don't work?

Here : How do I access a field value for an entity (e.g. node) object? Chx say : You can always do $entity->toArray() to see what's in an entity But $node->toArray(); don't work for me, why ...
5
votes
5answers
8k views

How to fix 'Call to undefined function node_load() in menu.inc' fatal PHP error?

Copied my live site to my local computer. From Windows server 2008 to Windows 7. Took a backup of the database via mysqldump. Restored the database on the dev-db-server. Now I'm trying to get my ...
1
vote
1answer
547 views

How to capture form fields to programmatically create new users

I briefly worked with Drupal several years ago, and now have come back to it for a single project. For all intents, I'm a total beginner. I need to create a new user from a custom form (html in a ...
-1
votes
0answers
70 views

How do I migrate a CCK node reference from drupal 6 to drupal 8?

I try to migrate cck field node reference drupal 6 to drupal 8 reference field?. After migrate I don't see cck field_node in drupal 8. field_node: - plugin: iterator source: field_node process: ...
0
votes
1answer
412 views

Is there a function to get the system path for the current language?

If I'm using multiple languages on the site with path prefixing, is there a quick way to get a system path for the current language? For example, if the current language is English, and I'm ...
38
votes
4answers
15k views

What is the difference between the Workbench and Workflow modules?

I use the Revisioning module to manage revisions of nodes on my Drupal 7 site. I had been updating the site by myself, so Revisioning was sufficient; now, however, I will be adding some content ...
-1
votes
0answers
77 views

Best Development Environment for Drupal 8? [on hold]

I'me coming from Drupal 7 and finally decided to hop onto Drupal 8. What is the best Drupal 8 development environment to work on? I am comfortable with command line and mostly do everything there with ...
2
votes
2answers
51 views

Where is the node created timestamp stored in the database?

I need to create an SQL query that finds all nodes of a certain type created X days ago, so I can get their IDs. Due to the massive number of nodes in the database, I would prefer to use a direct SQL ...
0
votes
0answers
17 views

After changing a webform multi-select field to single-select, submissions made pre-change show only the first selection

I've created a webform in Drupal 7 with a component drop-down list. I selected 'multiple' for multiple selections. Now, I need to unselect 'multiple' giving users just one choice of the drop-down ...
0
votes
2answers
560 views

How to theme the taxonomy add/edit term form?

I would like to change the design of the taxonomy add/edit term form, how do you create a template for the taxonomy "Add Term" / "Edit Term" just like creating a node form template? Not creating a ...
1
vote
2answers
565 views

turn off wysiwyg for full html filter format?

How do i set it so that the wysiwyg doesn't turn on during full html mode. I would prefer to hand edit the html during full html filter mode without the wysiwyg editor stripping my html. I'm using ...
0
votes
1answer
24 views

Setting up multilingual nodes

I am trying to set up a D8 (8.7.9 to be precise) multilingual site and hitting some weird bug. I have a node type basic page consisting of the title field and a body text field. Initially I create ...
0
votes
0answers
18 views

hook_default_rules_configuration can't debug it or force it to load

I am trying to debug a hook from title, here it says http://api.drupalhelp.net/api/rules/rules.api.php/function/hook_default_rules_configuration/7.2 "This hook is invoked when rules configurations ...
0
votes
0answers
40 views

Webform translated. Webform-block on page selected/listed not showing up (where is the manual)?

Drupal 8! Webform module! I have made a drupal webform and added it to my webpage with creating a block. The block is restricted to the page by url. Everything worked well with this method. With ...
8
votes
2answers
7k views

Create a content programmatically

In Drupal 8, how create a content programmatically ? From the "Drupal 8" administration, I created a new type "House" (contain a description, an image, a reference field to users ...). How can I ...
0
votes
1answer
25 views

Simplified Installation from Configuration in Database [on hold]

I want to be able to provide a simple way for users to install a Drupal website that contains a certain set of content, contributed modules and custom content types. I know that the standard way to do ...
0
votes
0answers
28 views

Invalidate cache of views block for anonymous users

I have a view display block that needs to be updated every 8 hours. I tried Views Custom Cache Tag module https://www.drupal.org/project/views_custom_cache_tag but I could not make it work. I set my ...
0
votes
2answers
447 views

How can get the current region inside the 'hook_preprocess_block'?

How can I get the current region name inside the hook_preprocess_block()? I tried the following code, but it seems something is wrong. function ThemeName_preprocess_block(&$variables) { if ($...
0
votes
0answers
18 views

Why does my Views PDF Display output display differently in different software?

Using Drupal 7 and Views PDF module, I have created an output pdf that looks perfect when opened in a browser, but is inconsistent everywhere else. This pdf displays as follows: Chrome, Firefox, Edge ...
1
vote
1answer
412 views

Index custom content in apache solr

I have several custom modules that load and display data from custom tables. I have successfully managed to use the drupal search on these contents, using the drupal search hooks like, ...
0
votes
0answers
15 views

I get error message ErrorException when trying to install module

I try to run a module install with composer require 'drupal/calendar:1.x-dev' then I get the error message ErrorException /_files directory not empty. I tried to remove the directory but same error ...
0
votes
1answer
422 views

DateTime iso format in api

I have created an api that filter out unixtime format. Currently, we can filter using /api/blogs?filter[created][value]=1426766400&filter[created][operator]=">="&api_key=DEMO_KEY That ...
22
votes
7answers
34k views

Get path alias from NID (or node object)

I have a node object, and I am trying to use it to get a given path in Drupal 8. There was drupal_lookup_path() in Drupal 7 but I'm not seeing any equivalent or documentation for Drupal 8. What's ...
0
votes
1answer
11 views

MiniOrange SAML SSO Drupal Module – Multilanguage Support

This is my first post at Drupal StackExchange. Please feel free to redirect it to the proper forum if this is the incorrect one. How do I configure Apache Server so that MiniOrange SAML SSO Drupal ...
2
votes
2answers
38 views

Saving a webform programmatically in a custom webform handler throws “Entity validation was skipped.”

I am trying to save a webform submission inside the postSave in a CustomWebformHandler class. class CustomWebformHandler extends WebformHandlerBase { [..] public function postSave(...
1
vote
3answers
324 views

drupalSettings object not showing for anonymous users. core/drupalSettings is added as a library dependency

I'm stumped on this one. I’m having an issue where the drupalSettings object is empty when not logged in. Works fine when I am authenticated. - core/drupalSettings is in theme’s *.libraries.yml file. ...
0
votes
1answer
2k views

How to build a Drupal 7 testimonials page?

I'm trying to build a Drupal site 7 and I want testimonials page. Site will be in several languages​​. I know Drupal 6 was such a module but not for Drupal 7. I want that site visitors can leave ...
0
votes
1answer
79 views

How to define template suggestions for node add and edit form by content type?

I have a content type Project and it has a more than 100 fields in the node form. The form fields are grouped in different section and category. I tried to use a field_group module to group and ...
0
votes
2answers
734 views

Boolean checkbox in sytems_settings_form

I have written the following code $form['checking'] = array( '#type' => 'checkbox', '#default_value' => variable_get('checking',0), '#title' => t('title'), '#required' => ...
1
vote
1answer
29 views

How to get the alt tag from an image field in twig?

I have a page of field images which are coming out quite weirdly when I kint their values. I can't seem to get the image url and the alt tag. The code in the twig file looks like this: field--field-...
0
votes
3answers
41 views

How do you deploy a change to a main menu?

We have a small D7 site. We want to deactivate a main menu item. On dev server I was able to deactivate it in /admin/structure/menu/manage/main-menu I believe The menu is stored in the DB, right. ...
2
votes
1answer
419 views

How to use drupal_get_form outside of a menu

I am trying to use the drupal_get_form funtion outside of a menu and am not having any luck finding examples of how this is done. An overview of what I am trying to achieve is: 1) Pass control from ...
8
votes
2answers
11k views

How do programmatically create fields for content types, and ADD them to the the content type form

Say I have this field, "map_description". I know I would this function to define the field: $field = array( 'field_name' => 'map_description', 'cardinality' => 1, 'type' => 'text', ); ...
1
vote
1answer
441 views

How to update taxonomy term of a node using services

I have created a new node using Services 3 module successfully, the code is below { "type":"page", "title":"New test page", "taxonomy": { "tid" :"367928" } } Configuration: Drupal ...
0
votes
0answers
22 views

Ckeditor pasted url links become hyperlinks

We have disabled 'Convert URLs into links'. When you copy a url link from a browser url field like: drupal.org. Your clipboard contains the FQDN: https://www.drupal.org/. When you past this into ...
1
vote
2answers
32 views

Filter on boolean with NULL (unset) value

Client wants to hide some published content from specific Views displays. Unpublishing the content is not an option: it needs to remain accessible. I added a boolean exclude_from_view field to ...
2
votes
1answer
1k views

How do I redirect in a class sub-classing the EventSubscriber class?

I want to redirect to a specific URL in an EventSubscriber class instead of showing the Page not found page. I followed Symfony2 redirect for event listener? but the redirect goes to the home. This ...
1
vote
3answers
158 views

How can I provide an autocomplete filter for tags in a Search API view?

I'm working to create a Search API view. I have an exposed filter that's a fulltext search filter. I'd like to expose another filter that works similar to the exposed entity reference, which allows ...
1
vote
1answer
416 views

Can I create an “unlimited” values variable?

I'm trying to create an exclude list of sorts that is configurable via the variable admin interface. I have created lots of single value variables, but never a variable as an array where through the ...
1
vote
3answers
841 views

Indexing the term of unpublished entities

I have a views of unpublished contents of content-type X, which has the Term Y. It works fine with published content but a thing that I noticed is that if I unpublished a content that has a taxonomy ...
-4
votes
0answers
20 views

Need help on dialogflow chatbot integration [on hold]

I need your help to integrate the Dialogflow chatbot integration with Drupal 8. I followed some guides, but I failed. Getting one by one issues while integration. Please help me to get the proper ...
2
votes
1answer
555 views

Redirect module does not allow redirection for existing node's path alias

I installed fresh Drupal 8 and after that the Redirect module with proper settings. After adding the redirect rule for a path alias it does not work but it saves data properly into the database. But ...
5
votes
4answers
20k views

How to correctly access entity elements in a twig template

I have an array of entities that i would like to render in a list. $ids = \Drupal::entityQuery('chemical') ->condition('tid', $tid) ->execute(); $controller = \Drupal::entityManager()->...
0
votes
2answers
435 views

Multiple domains with a language each

We've setup that english language points to an english domain, and for spanish we have a language. The spanish one is simply a symlink to the english code base. When translating nodes, I am being ...
0
votes
2answers
45 views

How do I programmatically attach a file to a file field in a node? [on hold]

I have a custom content type with a file field. I am trying to attach a file uploaded through a custom form to the custom content type. I am able to load the node and update all the other values of ...
0
votes
0answers
25 views

How to create paragraph of particular type using JSONAPI?

I am able to GET the data using endpoint "site_url/jsonapi/paragraph/text". But I am not able to create a new paragraph of type text. Its always giving me error "403 forbidden". I have tried all ...
0
votes
1answer
339 views

Trigger redirect after Webform Remote Post Handler posted successfully

I've made a webform with a handler. This handler does a Remote Post towards an API. This API is actually a custom module within the Drupal install which (after some logic) passes all of the ...
0
votes
0answers
139 views

Installation issues

So, to preface, I'm a complete novice when it comes to web development. I've never done it before, but my boss wants an e-commerce site built in Drupal 8. So, I'm following the steps listed in the ...

15 30 50 per page