Questions tagged [nodes]

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

Filter by
Sorted by
Tagged with
1 vote
2 answers
760 views

Set value for new field automatically based on another field

I want to add a new date field to an existing content type, and set the new field automatically for existing nodes to be equal to another date field from that content type. For example, if the new ...
1 vote
3 answers
425 views

A node reference is empty, although the multilingual support is enabled, and the node is translated

I just created a multilingual site (English-French) using Drupal 7 with the module Internationalization 7.x-1.4. Everything is working fine except with the module References 7.x-2.0. For instance, I ...
1 vote
1 answer
1k views

How can I get the translated path to the current node?

How to get path to current node but of another language? Available languages: English (URL prefix: en) Polish (default, no URL prefix) Enabled detection methods: URL (by prefix) Session (parameter:...
1 vote
1 answer
417 views

exporting/importing nodes without losing disqus comments / social media stats

I've been working on a website and the live version there is still content being created while i develop the local site. Whats the best way for me to import the new nodes that have been created on ...
2 votes
1 answer
580 views

Creating child nodes when creating parent

I'm trying to programmatically create child nodes according to a parent node's field value. When a node is created, a reference to these child nodes is saved in the parent node, although the ...
0 votes
2 answers
574 views

Dynamically creating menu links from a node's fields

I have to first, create a menu-like block based on the information in a content type. Below every link, there is a text area field from a content type (Conference) except for upcoming conferences and ...
0 votes
2 answers
625 views

Not able to save the selected custom populated option list

I have a cck select list where the options are populated by my custom code. There is no issue for populating the list but after that the selected options are not able to save. Is there any way to fix ...
0 votes
1 answer
532 views

Building the sidebar content on each node

Im going to build a version content heavy site that will contain over 100 of pages. All pages are created in a "Two column layout" the main column contains the Title and body text of the node. And ...
3 votes
1 answer
2k views

Why are two database tables (node and node_field_data) used for node data?

I would like to understand the database architecture of Drupal 8. I noticed that Drupal 8 has two separate tables (node and node_field_data) which include almost the same columns. Can anyone give some ...
0 votes
1 answer
513 views

Workbench Delete or Unpublish Multiple Nodes

I have recently installed work bench, when we view all contents there is no option to select multiple nodes and apply delete or unpublish action on them. I need to edit each node and then delete each ...
0 votes
3 answers
595 views

Organic-Groups multisite architecture

I have a task to build a series of websites all related to the same core business. Initially, I was going to build each one as a separate website. Later however, I was told the sites have to be able ...
0 votes
1 answer
464 views

How do I insert a user picture's thumbnail on the "Submitted by" field?

I want to insert user picture's thumbnail on "Submitted by" field, which is displayed in teaser such as the following. Submitted by [some_user] [someuser picture's thumbnail] on xx/xx/xx How do I ...
0 votes
2 answers
614 views

Pay-Per-Node Functionality

My client would like a content type that has to be purchased by a registered user on a node-per-node basis. A previously registered user will see a view with the available content they can purchase ...
0 votes
1 answer
503 views

How can I populate a node field based on a user field?

I have an "address" field among the user fields. Here users can specify several entries for their addresses. They can create orders (these are custom content type nodes). The order node has a "...
1 vote
2 answers
628 views

Permission to edit a node by multiple users

Suppose there is one node (Like node/4) which the Admin can edit. My requirement is to give permission to multiple users to edit the same node i.e. node/4. Please help how to accomplish this task.
4 votes
1 answer
701 views

Unlimited field collection pagination in node edit page

In my node I have a field collection which is set to unlimited. How to enable pagination for node edit page, where all items from that field collection are displayed? For display there are couple ...
0 votes
2 answers
2k views

Getting values on twig node template

I have installed ECK module in my website. Using it I have created a "report eck" entity in which I have different bundles like section, notes, etc., each containing different fields. I have my ...
1 vote
1 answer
788 views

How do I remove webforms from content types?

Currently, our site is built so that anytime a specific type of new content is created, the page automatically includes a form required for the end user. Due to tracking issues we're having with ...
1 vote
1 answer
530 views

node_load not show taxonomy terms

i dont know why the script node_load(7) output is : public 'field_tags' => array (size=1) 'und' => array (size=2) 0 => array (size=1) ...
3 votes
1 answer
568 views

How to manage reservations with a 2 hours duration without duplicate bookings?

I want to make a calendar view that will show when music teachers are available, so that students can register online and attend a lesson. The courses have all the same duration which is 2 hours. For ...
1 vote
1 answer
579 views

Is a content type or profile a better choice?

I am working on a new site where I want to show information for art galleries, artists, museums, public art installations and art education. I understand both the content type and profile ...
1 vote
1 answer
610 views

How to copy select list value from a webform submisison into select list field new node?

This is the scenario: A webform with the following fields Question -> Textfield Category -> Select options (Listbox) Listing vocabulary HETCAT A content type Question with these fields Title ...
0 votes
1 answer
112 views

How can I programmatically save node components?

There is a site with number of nodes including layout canvas and site studio components available in a node. When there will be changes in one of the components (new field added with default value), ...
5 votes
3 answers
2k views

How to programmatically add content to a group in the Group Module?

I'm using the Group module. If I have a group type such as Project, and I have a content type such as Article, and I programmatically created a new article node using Node::create(), how can I in the ...
1 vote
1 answer
391 views

See all nodes where user profile entity reference matches the same entity reference on the node

I have the Profile 2 module where a user selects a zip code (which is an entity reference to the content type ZipCode) The ZipCode content type has an entity reference to a Region content type. ...
0 votes
1 answer
479 views

Include Full Taxonomy Term inside a Content Type?

I'm working on a project where we want to pull in the title, description, and an image from selected taxonomy terms and include them in content of a predetermined content type. The content type is ...
0 votes
1 answer
504 views

Multiple blogs per user, each with a blog profile page

I'm trying to to create a site where users upon admin approval, can have multiple blogs, typically differentiated by language. Each blog should have a profile/landing page specific to that blog. I ...
4 votes
3 answers
492 views

How to Auto Publish nodes based on set interval?

I have nodes being generated from a Feeds import on a periodic basis, however when they are imported I would like them to be queued to be published on an hourly basis (or x minutes) I have looked at ...
0 votes
1 answer
757 views

One-to-many and many-to-many relation between nodes of different content types

I am using Relation module for creating relationship. But i didn't find the option how to create one to many, many to many relation. Can anybody tell me regarding that Thanks
0 votes
2 answers
541 views

Translation for node references not working properly

I have two content types: product feature and product. Both can be translated. If I create English product and assign many product features (by node reference inside field collection) and then create ...
0 votes
2 answers
758 views

Adding workflow to custom content types

I am trying to assign a workflow to my custom content type, but i can't find the option to get this working. Is it a bug or maybe just not part of the workflow module?
0 votes
1 answer
429 views

Organize node file attachments into groups

I have a content type with multiple file attachments to download. Is there a module to give authors the ability to divide all the attachments into groups, writing a title for every group, just like ...
4 votes
4 answers
4k views

How to programmatically set a node field as empty?

I have some nodes of a content type with following fields: title body image I want to programmatically (!important) set the body field as empty (to make it like it was never set with any value). ...
1 vote
1 answer
644 views

Redirect the title field of a content type to some external url in a view

I am using drupal 7 with view3 I have content type named News having many fields along with a taxonomy field named News Type, News type have terms: 'Free' and 'Premium', I am displaying News on my ...
0 votes
1 answer
437 views

How can I check the changes for the fields at form alter submit?

I am using hook_form_alter() with custom submit handler (). At submit I want to check if there is any change in the content except node->expire then my custom code will run. but at $form_state['...
1 vote
1 answer
2k views

How to add / update a field collection without updating parent node/entity?

I needed to to add / update field collections to node entities without updating the node entities. I tried two ways listed in https://www.drupal.org/node/1842304 and http://alexrayu.com/blog/...
0 votes
1 answer
404 views

How to make uploaded file permanent to node without node submit

My module automatically save new empty node when user create new node and redirect to edit this node. Now, is it possible to make uploaded file on _node_edit form without submitting form? edit: When ...
5 votes
3 answers
2k views

How to set a mini panel to display node fields?

I want to load node fields into a mini panel, but when I do what I think that I need to do, the mini panel (= MP) is invisible (because the fields aren't displayed, I guess). So far I have: Added ...
0 votes
1 answer
900 views

How update programmatically node entity with empty field_image?

i need to make an import from one mysql table in my base. I create node with : $value= array( 'type' => strtolower($typeProduit), 'field_1'=>"test", ...
1 vote
2 answers
425 views

Is there a way to find internal links to a specific web page?

For example, for a page called mysite.com/about can you determine any other pages that link directly to this web page? The goal is to determine all of the webpages that exist in mysite.com that have a ...
3 votes
2 answers
2k views

How to prevent a PDO exception when using Rules to Set a data value after saving new content?

I need to write a rule that edits some elements of the node, as soon as it is created. Unfortunately Drupal doesn’t like that and crashes whenever you try to save the node within a rule that was ...
0 votes
1 answer
624 views

Delete old files from server when content is updated

When a node is updated by replacing a new file upload, old files exist on the server maintaining versions. I want to delete old files from the server when content is updated.
9 votes
6 answers
10k views

How to restrict access to some nodes based on roles or users?

I am using Drupal 8 and I am a little bit confused that there is no core functionality to restrict the access to some nodes based on roles or users. I found PageAccess, which is marked as unsecure ...
14 votes
5 answers
27k views

How to get the url of a file field of a given node?

$node->field_file gives me a FileFieldItemList while the first entry seems to be a FileItem. $node->field_file->getValue() gives me an integer (I guess the file id). How can I actually get ...
0 votes
2 answers
1k views

How can I use contextual filters to display a block with field values from a single related entity?

I've found various recipes/threads with the scenario where have a content type A node and want to display in a sidebar block, all the related content type B nodes, with the relationship based on an ...
1 vote
1 answer
411 views

Get the node title field value in the form_state

Drupal version 9.3.9. This is a process of Ajax callback, where the value of the title field is required. In the form node add, the title is displayed. It seems that the form_state does not apply to ...
0 votes
3 answers
3k views

Max length of text field

How can I increase the max lenght of Tab-Title ?
2 votes
2 answers
670 views

Programmatically embed fields of one content type in the create/edit form of another content type and store all

I have drupal 6.x. How to programmatically (with a custom module) embed fields of one content type (content type X) in the create/edit form of another content type (content type Y) and store all ...
0 votes
1 answer
480 views

Drupal 7 Webform Components Related To Individual Nodes

I am attempting to create a decision making "questionnaire" in Drupal 7. I am currently using the Webform module to create the questionnaire. The questionnaire (webform) will create a list of related ...
2 votes
1 answer
780 views

Term lineage in simple Hierarchical select module

I'm working on a project using Drupal 7. I'm using simple Hierarchical select module. How its possible to attach the parent lineage to the node? Is there any way to do so using simple Hierarchical ...

1
2 3 4 5
151