0

I have a site with a large number of taxonomy terms. Now I need to add meta keywords and meta description to all of this terms. My solution is :

  1. Resave all terms by VBO module.
  2. Create a rules on "before saving taxonomy term".
  3. The created rules execute a PHP code which adds meta keywords and meta description to each of the tags.

In this way when VBO is resaving terms one by one my rules is executed for each of theme and do the trick.

Now the problem is in step one. I have an "execute arbitrary PHP script" operation in VBO for terms. I use this code in it:

taxonomy_term_save($entity);

but I face this error:

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /backup-sar/batch?id=412&op=do StatusText: OK ResponseText: Fatal error: Function name must be a string in C:\xampp\htdocs\backup-sar\sites\all\modules\views_bulk_operations\actions\script.action.inc(20) : eval()'d code on line 1

This one with the same error does not work too:

taxonomy_term_load($entity->tid);
taxonomy_term_save($entity);

Any help would be appreciated. Thanks in advance.

2
  • May I know why you are using custom callback for rule? Are you not able to do it by only vbo? – Prem Patel Jan 24 '17 at 12:35
  • @PremPatel I can do it in vbo too. The code is prepared in rules for newly added tags. So I can use it or white it in vbo. No difference. I am looking for any possible solution. – shekoufeh Jan 25 '17 at 9:09
0

If you're executing the VBO operation while in the Views configuration page, you're likely to run into this error. Save your view and go to the URL for that view and then run the operation.

A 200 return code actually indicates success, but the presence of the AJAX debugging screen interferes with the completion of the operation.

I know because I just ran into a nearly identical issue. :-)

1
  • I execute it in the defined url not in the views preview. – shekoufeh Jan 25 '17 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.