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

learn more… | top users | synonyms

0
votes
1answer
11 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
12 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
18 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
72 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
25 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
60 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
41 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 ...
0
votes
2answers
123 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
82 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
52 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
127 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
77 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 ...
0
votes
1answer
115 views

hook_node_insert() sporadically not being fired after node_save()

I have a situation where, every once in a while, I'll save a new node, and hook_node_insert() appears not to be called--AT ALL, for any of the modules that implement it. For example, if I look through ...
2
votes
1answer
183 views

How to create a node in Drupal 7 with a custom nid

I have to create a node in drupal 7 with a custom nid but the solution I've tried doesn't works (The created node not appears in the backend). If I create the same node without the custom nid, it ...
0
votes
1answer
54 views

Is there a reliable autosave function for nodes?

We're working with dirty forms to at least warn users before they leave an unfinished page before they save. It kind of works. Would enabling revisions control work? At least in that case an admin ...
1
vote
1answer
70 views

How to programmatically update node title?

I would like to programmatically update some fields including the title of a node, when this node is saved. To do so I am using a hook function MY_MODULE_node_update($node) { $node->title = ...
1
vote
2answers
77 views

How can I more efficiently save nodes programatically with my custom module without cron?

I have a scraper I created that aggregates data found on various sites, feeds, and databases. So that I don't hammer the servers to death that I am connecting to I have it set to sleep 5 seconds ...
1
vote
0answers
27 views

Feeds node import does not seem to call appropriate hooks to clear page from cache

I use Feeds for node import, but this does not refresh page content for anonymous users on my site. Are there some hooks not being called by Feeds on node creation that should flag the page as dirty ...
3
votes
0answers
135 views

Why not programatically created nodes in the simpletests?

Most core and many contrib simpletest test create nodes by preparing the interface, logging an admin in and then filling out the form on /node/add/foo. Not only is this terribly slow, it fails at the ...
2
votes
1answer
121 views

Saving a unpublished node without validation

I have site with a content type that has a large number of fields on it. I would like to allow users to start to create nodes, but not have to fill out all of the fields in one sitting. Partially ...
0
votes
1answer
162 views

Save a node via javascript

I want to be able to save a node when certain events happen in the browser. I.E the user changes tab. Is it possible to save a node in drupal using javascript? Is there a javascript api tfor drupal? ...
1
vote
2answers
32 views

Programatically upload a page in D7

I'm certainly a noob, so sorry for this if it's very basic. I had an installation of D6 and the following code was working perfectly. But when I upgraded to D7, the page was posted, but the body ...
1
vote
2answers
464 views

How to avoid max execution timeout when importing a lot of nodes programmatically?

I am creating a content synchronisation module. I have a UI that allows a user to import nodes from a remote site. They enter the site url and web service endpoint, along with some other ...
0
votes
1answer
51 views

How to tell if node has been updated via UI form as oppose to programmatically?

I am importing/updating nodes from a web service using node_save. One feature that I want to achieve is when the imported node is changed locally, it should not receive any further updates from the ...
1
vote
1answer
75 views

EntityFieldQueryException when saving node

I have created a node type which I want to use to store events in. I can create new nodes of this type with no problems, but when I want to edit and save a existing node, I get this error: In ...
1
vote
1answer
51 views

How to Save a Node Object reached from another Server?

I'm implementing the Node Object passing one Site to another. I am now able to send the $node object across the sites. But the problem now again is i can NOT do node_save($node) simply. I can NOT ...
0
votes
2answers
120 views

How to re-generate Node Object from database stored Serialized Node Data .. and then Save as New Node?

In Drupal 7, for some reason, i am storing some serialize($node) objects into Database. So these data in the database (in text column) are storing like: ...
2
votes
1answer
247 views

Adding multiple fields in node_save()

Its possible to add a node using the code below, but how do i add multiple fields? $node = new StdClass();//creating a bare node $node->type = 'answer';//giving it type $node->status = 1;//give ...
0
votes
1answer
409 views

Drupal 7 Is the a way to programmatically know the Fields in a Content Type?

In Drupal 7, i need to Programmatically create the nodes, by using: $node = new stdClass(); $node->type = "movie"; After, just this codes above, and lets assume i don't know what are the fields ...
1
vote
1answer
66 views

Drupal 7 Does “New Node Creation” initiate/prepare the Fields for different Content Types?

In Drupal 7, i need to Programmatically create the Nodes. As usual, there are Different Fields set for Different Content Types. For very simple example: Content Type: "car" Fields: "Model", ...
0
votes
1answer
622 views

Drupal 7 Rules : How to get Node Object (from Custom PHP) after a node event is triggered?

In Drupal 7, i am setting up a rule. That rule is applying to trigger on the Node Save event. After the node is saved [Condition] and the rule is properly triggered, then how can i get that saved ...
0
votes
1answer
151 views

Drupal 7 Core Module Function for node_save?

In Drupal 7, i want to put a additional code when the Save button is Clicked (Saving) in "a content" form (New or Edit). I don't want to know the hook (because i don't want to make an obvious Custom ...
7
votes
1answer
202 views

What is the best choice to create a node through code?

The scenario goes this way, I have a node type which has lot of Taxonomy term fields in it. It does also have other fields like text, date etc but 90% of it is a taxonomy field. I am aware that a node ...