Opening an issue to upgrade regcode for Views 3.

I just tested with views 3 alpha 3 and while the bulk operation view is shown, there is an issue with sending [regcode] token which is empty.

Comments

lasconic’s picture

There are two problems :

  • rid is not sent back by the view. You can add it as a field in the view UI. I guess there is a way to add it in the default view inc file as well.
  • regcode_load relies on the fact that its parameter is the rid or the code itself. To do the distinction it relies on the fact that one is a int and the other one is a string. Unfortunatly, after some experiment, it appears that views_bulk_operations always send a String and regcode_load failed.

I got the following message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1 query: regcode_load /* admin : regcode_load */ SELECT * FROM regcode WHERE LIMIT 1

I fix it by changing is_int by is_numeric in regcode_load. Unfortunatly, it means you can't have 100% numeric codes.

aidanlis’s picture

Hrm ... although the first is quite easy to solve, the second is much harder as it requires an API change.

aidanlis’s picture

Okay, this should be done! I'm sure the change regcode_load will introduce bugs somewhere but everything appears to work.

aidanlis’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.