After upgrading Node Teaser to version 5.x-1.2, whenever I create a new node "n/a" appears in the body field on node/add/* pages. A minor issue because it can be deleted easily, but an issue nonetheless.

Comments

nancydru’s picture

Check that the input format that is being assigned is available to the person seeing this.

jackalope’s picture

I'm experiencing the same problem after upgrading to 5.x-1.2, and I've verified that the assigned input format is available to the user.

ericclaeren’s picture

Having the same problem, installed 1.1 and that works, 1.2 doesn't work correctly with fckeditor

Pedro J. Fernandez’s picture

For me is "n/d". May be it appears when the user doesn't define a text for signature?

Pedro J. Fernandez’s picture

The signarute doesn't appear. Only the "n/d".

gatiba’s picture

Same problem here: n/a on body with 5.x-1.2...

nancydru’s picture

See comment #1. While I think this is not being handled in the best way, it is not inappropriate.

wouter99999’s picture

I've the same. The input format that is being assigned is available to the person seeing this, so that is not the problem.

d.sibaud’s picture

same problem with fckeditor installed

spookypld’s picture

got this too

my uid=1

foripepe’s picture

I think the problem comes from here (nodeteaser.module / nodeteaser_nodeapi()):

    case 'prepare':
      $node = _nodeteaser_load($node);
      $node = node_prepare($node, $teaser);
      break;

Short fix: Comment out the node_prepare() function.

      //$node = node_prepare($node, $teaser);
jonskulski’s picture

That is indeed where the n/a shows up. nodeteaser calls node_prepare which does:

  if ($teaser == FALSE) {
    $node->body = check_markup($node->body, $node->format, FALSE);
  }
  else {
    $node->teaser = check_markup($node->teaser, $node->format, FALSE);
  }

and check_markup returns t('n/a') if the first argument is empty.

@NancyDru
The check that fails is

if (isset($text) && (!$check || filter_access($format))) {

so you're right that the filter_access might fail, but also if the $node->body or $node->teaser is empty, then we will see the n/a as well.

I am using the bio module for a site which do not have a $node->body.

I am not sure the correct action here.

@Pedro: Are you using translation? That is probably why n/d is showing for you?

nancydru’s picture

In either case, I think "n/a" is not inappropriate. And, at any rate, this a core issue and not this module's.

vsemykin’s picture

nodeteaser.module / nodeteaser_nodeapi()

...
    case 'prepare':
      $node = _nodeteaser_load($node, $teaser);
//      $node = node_prepare($node, $teaser);
      break;
    case 'view':
      $node = _nodeteaser_load($node, $teaser);
//      $node = node_prepare($node, $teaser);
      break;
...

nodeteaser.module / _nodeteaser_load

function _nodeteaser_load($node, $teaser) {
...
  if (isset($node->nodeteaser)) {
     $nt->teaser = $node->nodeteaser;
  } else {
     $nt = db_fetch_object(db_query('SELECT teaser FROM {nodeteaser} WHERE nid = %d', $id));
     if (!$nt) {
        $node->nodeteaser = FALSE;
     } else {
        $node->teaser = check_markup($nt->teaser, $node->format, FALSE);
        $node->content['body'] = array(
            '#value' => $teaser ? $node->teaser : $node->body,
            '#weight' => 0,
            );
     }
  }
...
carpClash’s picture

Title: "n/a" appers in node body when adding a new node after upgrade to 1.2 » n/d on nodes
Version: 5.x-1.2 » master
Category: bug » task
Issue tags: +n/d on nodes

I remember having the "n/d" issue on nodes and also that I could fix it in a minute by rebuilding permissions. Hope this help someone since I came up here looking for the fix described.