Hi, trying to build an additional tags module I have a problem, because my process is called everytime 3 times when a node is involved which contains a valid replacement mark: I guess this is happen during global _process for fields "text?", "teaser", "body".

What I do not understand is, why is it allways called for all fields even e.g. if only teaser is shown. I want to add some js-inline stuff with

drupal_add_js('my script', 'inline');

and by this, its allways included 3 times to the head section :-( also I guess it slows down system speed if everything is rendered 3 times even it is not used ?!

Any ideas, help would be nice.

Thanx Tom

Comments

Tom Freudenberg’s picture

Hi tried to fix above scenario I have done this:

In "reptag_process.inc" line 126 ff. is

  // iterate over all $fields
  foreach ($fields as $field) {

    bla ....
   
    ... invoke _process

  }

Now I break at then end of first loop with "break;" so that the "foreach" will only handle element [0] of $fields. Everything works fine for me now and a ll modules/tags.libraries are called only once.

Does this makes sence ? Is there something which is missed now ?

Thx for comment
Tom

duaelfr’s picture

Status: Active » Closed (won't fix)

This version of Rep[lacement]Tags is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.