Take a look to this usual piece of code for programmatical node creation:

 $node = (object)$node;

  if ($node = node_submit($node)) {
    if(!$node->uid) $node->uid = 1;
    node_save($node);

    drupal_set_message('Thank you for your node!');
    drupal_goto('node/' . $node->nid);
  }

After this code is executed, activity row is presented and status field worth 0. Thats why the activity message is not presented at the list of activities.

How this case could be fixed?

Comments

Scott Reynolds’s picture

$node = (object)$node;
$node->status = 1;
  if ($node = node_submit($node)) {
    if(!$node->uid) $node->uid = 1;
    node_save($node);

    drupal_set_message('Thank you for your node!');
    drupal_goto('node/' . $node->nid);
  }

cr0ss’s picture

Hey Scott, thanks for snippet.

But Im talking about Activity Status = 0. Or you mean that only published nodes are getting Activity Status = 1 ?

I'll try it.

Scott Reynolds’s picture

Category: bug » support

But Im talking about Activity Status = 0. Or you mean that only published nodes are getting Activity Status = 1 ?

Of course, if a node isn't published neither should any activity on that node be published. If a user is blocked, all their Activity Status = 0 as well.

_shy’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

D6 reached its EOL back in February 2016, and there is no active release for D6 for this module anymore.
Development or support is not planned for D6. All D6-related issues are marked as outdated in a bunch.

If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.