Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The most basic form of content on a Drupal site is a node.

0
votes
0answers
28 views

Detecting a page if it is in edit mode by checking arg(2) == 'edit' is not working when there is an overlay

Referring to the below question link Question: Know if node is in view, edit, delete, etc. in page.tpl I tried the answer in the above link but arg(2) returns NULL instead of 'edit' when the edit ...
0
votes
1answer
23 views

Dynamic Menu with Views

Background: This is not the first question asked around here. I thought I found a solution but nothing worked in the end. I have 2 content type: Parent and Child Child possess 2 Entity Reference(ER) ...
0
votes
0answers
24 views

Very slow menu_tree_check_access query - how to debug

I have a Drupal System which is running fine in production and locally but the dev/cons Db seems to have a problem. After looking a bit deeper into it I found that menu_tree_check_access takes 3.8 Sec ...
-2
votes
0answers
21 views

how to create link [closed]

I want to create a link for next page i have three field which values is called from the database i have created link like this but its showing all as a hyper link i want to show only one part as ...
1
vote
2answers
46 views

What is the correct way to get the link url?

We have a Basic Page content type with a link field (field_link). When we call the mymodule_preprocess_node(&$variables) hook in a custom module we use ksm($node->get('field_link')->first()) ...
0
votes
1answer
34 views

Few content types in a View

I use Drupal 8 and I need to create a view with few content types. When I navigate to a specific path, I need to list all of them at the same time, but I need something like a filter so that in this ...
0
votes
2answers
27 views

How do I create a list of Nodes within a list of taxonomy terms, within a node?

I want to make an awards event where users can log in and nominate their products in specific categories. I have a node: "Awards Event" where the details of the event are defined I have a taxonomy: "...
2
votes
1answer
51 views

Not all fields of node are present in content

I've set up a custom content on my multilang site type with several fields that are all configured to be translatable. But when I try to theme that node I only habe a subset of the field available, ...
0
votes
1answer
55 views

Invalidate a specific cache tag on any saved taxonomy term

I would like to clear cache tag of a particular bundle when any taxonomy terms are update/ saved. I know the default node tag is saved like node:1, node:2, but I'm confused on how to invalidate a ...
0
votes
0answers
6 views

facebook comments plugin inject from content type

I'm using drupal 8 and I want to add facebook comments pulgin into my site. I've installed the facebook comments pulgin and configured it on my site. Once it was installed I went to Structure >Block ...
-2
votes
1answer
33 views

Unable to get a proper content page [closed]

I am unable to get a correct content page after clicking on Content >> Add Content in Drupal 7 . What I am getting is this. I am expecting to get the following. Please help resolve. After ...
1
vote
1answer
32 views

Content sorted by machine name not title

I've drupal 8 configured on my server then I created content types. Now When I click Add Content on content page all the content types are sorted by machine name and not by their title. For e.g I've ...
0
votes
2answers
40 views

HTML tags of an article not working

I came across this issue. I wrote an article in editor and I put there basic HTML tags like <strong> and so on. The thing is, in editor it shows right, but when I publish the article, the HTML ...
-1
votes
1answer
12 views

Limit Entity Reference Options depending on one of the referenced content type fields value [closed]

I have two content types Cylinder Master and Association. Cylinder Master contains all the cylinder details and an Allocation status field(Allocated/Unallocated). In Association I am referencing the ...
1
vote
0answers
23 views

How to create content of content type which is a reference to a paragraph?

I want to add a content to content type (ct1) which has only one field (f1) which is a reference to a paragraph (p1), said paragraph has 4 fields: 3 numeric fields (1, 2, 3) and entity reference (er1) ...
-1
votes
1answer
61 views

Filter two different views using one single filter field

on my Drupal 8 website, i have articles and users with both having the Phone Number field in commun. Note that both articles and users are totally separated and not connected to each other in any way....
0
votes
0answers
30 views

Contact form inside Content Type

Contact Form is not displaying on the content type page, as it shows empty page. I'm trying to follow the steps outlined in this article: https://www.flocondetoile.fr/blog/drupal-8-inject-contact-...
-1
votes
1answer
29 views

How to update one content after saving existing content? [closed]

I'm trying to update one content type after saving existing content of another content type. How to achieve that?
0
votes
1answer
19 views

Adding HTML class attributes to Entity Reference field links in View

I have a view ("Tasks") that pulls in Task nodes, complete with sorting and filtering. Each Task can have multiple nodes attached via the "Related Articles" field (field_related_articles). I am trying ...
0
votes
0answers
15 views

Import content to paragraph by referenced content type

This one is pretty complex thing and to be honest i have no slightest idea how to do this, especially since i'm beginner in drupal development. My task goes like this: Paragraph called "paragraph" ...
3
votes
1answer
31 views

How to set additional node type options programmatically?

When creating a node type programatically, some node type options can be set in hook_node_info, including name, base, description, has_title, title_label, has_body, and help. As far as these node ...
0
votes
0answers
10 views

Thumbnails of images aren't generated in the News Node

I'm new to Drupal and I'm currently working on a page where there's a News Node. This asks for the Title, Image and the content. When I try to upload an image, Drupal should generate two different ...
-1
votes
0answers
23 views

How to create next month and previous month button

I would like to create two buttons, a next button and a previous button, in Drupal 8 so the user can click on a button to switch the month in calendar. Something like this: http://demos.codexworld....
1
vote
1answer
30 views

Check if a node field has changed upon save

I am parsing pdf's in a field for a custom content type in a cron job. I have a boolean on each node that determines whether their pdf has already been parsed. I grab the ones I need like so: $query =...
-2
votes
1answer
33 views

Autoload next page while scrolling to the bottom [on hold]

I am looking for a way to automatically load the next article once a reader has scrolled to the bottom of the page. Something similar to what this wordpress plugin is doing. So I understand that the ...
0
votes
1answer
36 views

Cannot use object of type stdClass as array error in node save

I built a custom form and one of them is of type geocode with lat/lon fields. When I try to save the node I receive the following error: Cannot use object of type stdClass as array in /var/www/...
0
votes
0answers
13 views

Field link to reference another view mode

How do i add a link field to Drupal 8 entity and reference another display mode? Say: on the default display mode, i don't want the user to see all the information but to click on a link for either a ...
0
votes
1answer
28 views

how to change save button to Save and keep published?

In the content form want to change the publish checkbox and save button into the dropdown "Save and keep published" and Save and unpublish How can i change the layout for all content type.
0
votes
0answers
9 views

Language drop down shows the node id in the front page

This is only applicable for the front page. When I click the language drop down and select a language from the front page, the redirected url shows the node id. (/ja/node/187). It should only show the ...
0
votes
1answer
27 views

How to get all the field and value of node as an array? [closed]

I am trying to render all field and value of a node as an array dynamically. How can i achieve that?
0
votes
1answer
21 views

Rules to remove user from role on node publish

I have tried the following: Event: updating an existing content condition: NOT node-unchanged published remove user role (I'm stuck here) The last item is my problem. There is no user reference in ...
0
votes
0answers
13 views

Increase the size of the upload file in html textarea [duplicate]

I work with drupal 8. I have a content type with HTML textarea field. On the toolbar one can find a button to upload a file, which is limited to 2 MB. I need to increase it up to 12MB. Any ideas how ...
-1
votes
0answers
57 views

Auto refresh block views without entire page reload

I have a drupal 8 website with a block view displaying nodes in a table format. Users on the website will continuously adding/updating nodes and so i would like to refresh this block view to display ...
0
votes
0answers
16 views

problem with db_select, ->condition dont work if compare a field with a value

im trying to make a field with the results of a sql in php . im trying to make a condition with the field "manifestacionType" and compare with value 'compuesta'. The problem is that i dont know to do ...
0
votes
0answers
20 views

How do I add a new node as reference?

I want to know if the Rules module is able to add a new node as new instance to the entity referenced field of another node. Imagine we have two content types, Person and Book, where each person has ...
0
votes
0answers
28 views

Search API result get view containing article, not article it self

I am having difficulties with finding view that contains searched text, not article it self. I have a page congaing 2 blocks of views, and would like to get a link to that page. Currently I get search ...
1
vote
1answer
20 views

Node ID is missing in contextual filters

The node ID is missing in the view contextual filters. How can I use the node ID as contextual filter?
1
vote
1answer
13 views

Prevent page creation for a published custom content type

I have a Drupal 8 custom content type that is used in views only. I would like to prevent this type from creating a web page for content that is published.
0
votes
0answers
10 views

Advanced Forum User Edit Posts

On my Drupal 7 forum, I have the ability to have other users create posts. But there is no button for the authenticated user to edit/delete their posts. I have scoured Drupal and the internet. Is ...
0
votes
0answers
7 views

Advanced Forum Indented Comments

I am new to Drupal (currently using Drupal 7). I am customizing the look of my forum and find that lack of indentation on the posts to be a cumbersome read when users are scanning the replies. For ...
0
votes
0answers
10 views

Registered users create lists and share that list for D8

I have set up flags so that registered users can flag a node and then create a list on their saved flags page. The problem is, this is for their eyes only. I want two things, for them to be able to ...
0
votes
1answer
51 views

Add an attribute to $variables from a Controller

I need to add an attribute to the body tag from a controller. Adding a body tag with hook_preprocess_HOOK() is not a problem. /** * Implements hook_preprocess_HOOK(). */ function ...
0
votes
1answer
12 views

Tags won't show on Advanced Forum Module

I am using Drupal 7. I'm struggling to get the tags to show on my forums within the Advanced Forum module. I have configured them within the manage fields settings but they will not show anywhere ...
0
votes
1answer
30 views

How to query all content type and add as checkbox for custom form? [duplicate]

Need help on how to create a custom form that is only available for admins that will query all content types and display the options as a checkbox. The goal is to only add certain libraries to ...
0
votes
2answers
44 views

How to add a pager at both the top and bottom of a View

How can I do this for Drupal 8? I have searched for a solution but I didn't find anything yet, I hope some one here can help me. I have this "pager.html.twig" (from the clasy theme) template in the ...
1
vote
1answer
94 views

How do I stop the node from caching

Sometimes when I run below code in the hook_preprocess_menu() of a node, I am getting a previously loaded node instead of my current node. \Drupal::routeMatch()->getParameter('node'); What should ...
0
votes
2answers
160 views

Custom code for after submitting a webform

I have found this question here to fit my exact needs since the rules modules is not ready yet How to create a node out of a webform submission? I am hardly a coder, can someone please explain where ...
0
votes
0answers
18 views

I cannot delete a file field from node

D7 content type with file field. On edit page, displays attachment(s) with Remove button, but cannot remove. Get blue "spinner" for a few seconds. Also issue with upload of file field. Upload action ...
0
votes
0answers
12 views

Dynamically update node with limit for changing the order of list item in the view

Listing Node in one view and it is creating by multiple users. By default the view is sorted by 'node update date'. What I'm trying to do: I want to update listing sort order when author trigger '...
0
votes
0answers
35 views

How to use different theme for same database by using multi site?

I am working on the drupal8 multi site . I have setup with different database its working fine. But I want to use with same database and different theme for both the sites which I have created by ...