node_save is a drupal core function in node module which save the actual node.

learn more… | top users | synonyms

0
votes
0answers
8 views

Drupal commerce/inline entity form submit handler

Commerce Kickstart (commerce_kickstart-7.x-2.9) Save Draft I have a complex content type that's associated with a commerce product. When I install save draft and try to "Save as Draft" I get the ...
0
votes
1answer
18 views

How to change the language of a node and all its fields and all related data?

On my multilingual site, I have a content type that is going to be user created. I want to keep it language neutral ('und'). But there already are a couple thousand nodes of that content type and ...
1
vote
1answer
25 views

How do i run node save in background process

I have created drupal website for ecommerce store. Issue: After node save i will redirect to thankyou (destination) page for tracking but it takes long time to complete. Customer may skip if it takes ...
1
vote
0answers
25 views

Boost + Expire: Front Page not expiring from cache

I am using Boost and Cache Expiration. My site generates nodes automatically and adds them via node_save(). I have setup Expire to get triggered on node insert, update and delete and to let the front ...
0
votes
0answers
23 views

Drupal sometimes doesn't save or delete node

I have experienced sometimes after few minutes spent on the edit page (to fill the form), I want to save or delete the node, it doesn't work. It redirect to the edit page without any notification or ...
0
votes
1answer
24 views

How to skip client side validation for draft node?

I am using clientside validation module for drupal 7.I have two button for submit node one is for save as draft and other submit so Now my scenario is that if i click on save as draft then it should ...
2
votes
1answer
38 views

how to catch when node is being promoted?

I would like to take some action when node is being promoted. I tried using node_validate or node_presave but none of them is working. What is the quickest way to do this? thanks
2
votes
2answers
158 views

Programmatically create a node with alias and menu item using Entity API

I've seen the excellent documentation on Drupal.org about how to create a node in code, but that documentation doesn't address how to create the node's alias. I've seen code snippets that use ...
2
votes
1answer
54 views

$entity_wrapper->save(true) vs. entity_save('node', $entity)?

Say I've got the following block of code: $language = language_default(); $values = array([...]); $entity = entity_create('node', $values); $entity_wrapper = entity_metadata_wrapper('node', ...
1
vote
1answer
113 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). ...
0
votes
1answer
28 views

Drupal - Save for Later using Workbench, conditional required fields

I have a node set up with a few workbench states. The first state, "Draft", should be used to allow someone to save the node without any required fields. The second state, "Submitted", should make the ...
0
votes
1answer
41 views

Does not using node_save for updating nodes impact SEO for our site

We changed our node updation process from using node_save() to manually updating the nodes via db queries. What dramatic change we have seen is that number of people coming to us via seo has dropped ...
0
votes
0answers
29 views

warning: Illegal offset type in select .inc: 1291

i Wrote a PHPScript to update a taxanomy terms in DRUPAL from .csv file. Here i used $node-nid = $node_id; $node->field_category[LANGUAGE_NONE][0] = array('tid' => $tag_keyword_tid); ...
2
votes
3answers
188 views

Entity Metadata Wrapper Save VS Node Save when invoked from hook_node_insert

Can somebody shine a light into the difference of the two, in terms of their interaction with database when hook_node_insert() is invoked? The documentation explains that Note that when this hook ...
2
votes
2answers
116 views

How to edit a node programatically after it has been created?

My articles have a field 'Ranking' and I'd like to give a value to this field after a node has been created. The value depends on the node's ranking in a view called 'Top 3'. I tried the following in ...
0
votes
0answers
36 views

Node title is not updated when saving the source node,when field collection data exist

The steps I follow are: 1) Create a new node in the source language, English and enter data to its field collection fields 2) Go to the node and change the node title. Click save. The node title is ...
0
votes
0answers
15 views

Product has been created but The post could not be saved. while creating a product in ubercart module

i am trying to create a product in drupal 6 by using ubcart module but this error occurs Product productname has been created. The post could not be saved. can i know what is the problem and how ...
-1
votes
1answer
68 views

Save checkboxes value into another checkbox field

I'd like to save the value of a checkboxes field which is link to a product once I save my content type. I've created the code needed to create the product and the node. When the node is in creation ...
1
vote
1answer
47 views

Is there a way to make a keyboard shortcut for Save on the node edit page?

It would save a lot of time not having to scroll to the bottom of the page to save edits to a node. Are there modules which achieve this?
1
vote
1answer
108 views

Best hook to use to save a new node when a node is saved

I want programatically create a new node of type B (status message), immediately after a node of type A (e.g. gallery post) is added (or updated). Looking at this recipe, I see that I will have to ...
0
votes
0answers
36 views

D7: Custom fields inside nodes won't save; conflict with db_set_active()?

i am using a single PHP bootstrap file to import data from another database to drupal nodes. Unfortunately the custom fields do not show up inside the node. Can you guys give me a hint what i am ...
0
votes
0answers
20 views

Transactioning multiple node saves

I have a function that needs to add 3 different inner-related nodes, and I want it to be setup so if any one of their additions fails the previously added ones will not be saved (aka, either all three ...
1
vote
1answer
55 views

programmatically saving a node doesn't add any record to dblog

When I call node_save to save a node, no record for "a new node has been saved.." is added to watchdog. Is this normal? If yes, how do I also add a watchdog record? (without calling the watchdog ...
1
vote
2answers
72 views

Create a node Programmatically having Composed Field

I have a content type having composed filed (used Composed Field module for this). How can I create a node programmatically with composed field values?
0
votes
1answer
112 views

Problem with node_save within a loop

Within an instance of hook_submit (for a custom form), I'm trying to iterate over a list of nodes, updating each of them. The general outline is $x = node_load_multiple($nids); $data = array(--some ...
0
votes
1answer
117 views

Validation at node_presave in drupal 6

I received a somewhat complicated Drupal 6 application to maintain and unfortunately I am quite a newbie with Drupal. The task is to verify certain system variable is set before saving the node. Is ...
0
votes
2answers
108 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
0answers
50 views

Syncing content to a Drupal 6 site

i've run into a problem and need some advice. Basically I have recently set up a new Drupal 7 site, which has to share its users with the old Drupal 6 site, which is working fine after i created a ...
0
votes
2answers
296 views

Adding a custom path for node

I have enabled the path auto and workbench modules in my drupal installation. I have to set the url alias once only. Once a node is published and url alias is generated, the url alias should not be ...
0
votes
0answers
22 views

Free tagging read only in Drupal 6

I have a problem with duplicated free tags in Drupal 6. It seems way too easy for my content contributers to create duplicate free tags. How can I test for duplicate tags in that vocabulary? Or ...
0
votes
2answers
634 views

Adding a date time field value within a node programmatically

[field_download_time] => Array ( [und] => Array ( [0] => Array ( ...
1
vote
0answers
148 views

Programmatically create node with select List

I'm trying to add nodes via a JSON feed. However, I'm having trouble setting the value of a select list field. I have this at the moment: $node->field_name[0]['nid'] = ...
0
votes
1answer
155 views

How to save autocomplete and date type fields while adding node programmatically?

I am creating a node programmatically and I have a field which is autocomplete and has number of values set to unlimited. In the code for adding the node programmatically ,the code is as given below ...
4
votes
1answer
320 views

What is the purpose of using node_submit() before node_save()?

I am creating a node programmatically , In the code given in the link http://timonweb.com/how-programmatically-create-nodes-comments-and-taxonomies-drupal-7 after creating a node, the code goes as ...
0
votes
0answers
60 views

Drupal 6 - form submission data loss from empty required fields

Scenario: Content profile node-type has new required fields added after many users have already filled out their profile info. (this scenario can work for any node-type). They go back to update ...
1
vote
0answers
166 views

Trivial Example of a Module that Creates a Content Type

I want to write a module that creates a content type with a title and one or more textfields. I'm having a very hard time simplifying the roles of each hook function call in the documentation of the ...
0
votes
1answer
23 views

Is it possible to get <any> form submission diff with Diff module

Diff module, from what i've seen works with node revision differences, not node edit submission diff. Is diffing any entity-related form submission possible programmatically through Diff module API? ...
0
votes
1answer
487 views

Create a node programmatically then reference an existing node to that node?

I'm using Drupal 7 and trying to create a node programmatically. Once the node has been created I would like to reference it to an existing node I'm creating a node programmatically like below $node ...
0
votes
1answer
63 views

File field emptied on node_save

I know that similar questions have been asked before but none of the suggestions there have helped me at all. I've been trying all day to get this node to save file data and nothing has worked. I'm ...
0
votes
1answer
465 views

Adding extra button on node edit form with save functionality enabled

I want to add an extra button on the node/edit drupal 7 form. That can be done by hooking into the form_alter: $form['actions']['push'] = array( '#type' => 'submit', '#value' => t('Save ...
1
vote
0answers
53 views

Node form elements don't work when inserted with Panels. Am I missing something?

What I have done: Created a Panels variant for viewing a node. Added a Context relationship to the node edit form. Added a form element with the relationship. Added the node save button with the ...
1
vote
1answer
1k views

Where and how does drupal store the node body in drupal 7?

I am programatically trying to create a custom node to store some content, which I would like to display on a page. Following is how I am executing it. $node = new StdClass(); $node->name ...
1
vote
2answers
145 views

Mapping existing file against a new content type

I am facing a situation here. I have a content type A with an image field(field_upload_snaps) in it. There is another content type B which also contains an image field(field_valid_snaps). Now user ...
0
votes
0answers
827 views

Rules: After saving new content - Set a data value

I need to do a simple thing. 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 ...
0
votes
1answer
81 views

Heading at top of node/add or node/edit

In my node/custom_content/edit and/or node/add/custom_content page i want to place a heading at the top of the page as Create New My-Content. Seems simple enough but i am unable to do so...How can ...
3
votes
3answers
738 views

How can I speed up drupal's node_save() function?

I am having a lot of trouble with the inefficiency of node_save(). But is node save my problem? That's ultimately what I am trying to find out. I created a loop with 100,000 iterations. I created ...
0
votes
1answer
1k views

Custom Field Not Being Saved programattically through node_save()

So there is a custom field I added called 'qid'. I can see that it is being created with each node. My issue is that I cannot programmatically save a value to my custom field. In the code below I ...
1
vote
1answer
166 views

Adding text to a field before save (Drupal 7)

I run into a situation where I need to wrap text inputted into a field before it is saved. I'm not sure the best way to do this, seems pretty straightforward but I'd like to find the "recommended ...
1
vote
0answers
697 views

D7 - Feeds 7.x-2.x-dev - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry

Can any one help me with this? I'm not sure what's causing my feeds importer to fail on import. I have debugged the saving function of the feed item found out it's trying to insert the node twice ...
0
votes
1answer
277 views

Programmatically submit form / save all nodes

After migrating all the content from a drupal 6 installation to a drupal 7 one, I ended up with empty fields in my nodes, that are displayed when viewing the node. However if I edit the node without ...