I just installed this module and was trying to get it set up to add people to an Organic Group when registering with a registration code, but when I go to the Organic Groups tab I get the following error.

Fatal error: Call to undefined function regcode_get_categories() in /sites/all/modules/regcode/regcode_og\regcode_og.module  on line 77

I could not find any other reports of this error so I am wondering if I forgot to install something or need to enable an option, but it appears to me that the function has just been left out of the module.

CommentFileSizeAuthor
#7 regcode_og.module.txt4.39 KBmdost@sharpdotinc.com

Comments

DiversiCon’s picture

Title: regcode_get_categories() is undefined » Same Issue

Drupal 6.16, OG 6.x-2.1
Installed regcode 6.x-2.2, created a tag, created a registration code then clicked on "Organic Groups" tab. Immediately received the above noted message. I grepped the referenced function name (regcode_get_categories) but did not get any hits other than the line 77 of regcode_og.module. It's definitely broken.

aidanlis’s picture

Regcode doesn't have categories any more, it uses taxonomy and tags. The author of the regcode_og module will need to update the module ...

mdost@sharpdotinc.com’s picture

Title: Same Issue » undefined function regcode_get_categories

I would not mind helping, to resolve this issue,but this is the first time I have used the regcodes module and am not sure how it tied into OG. If anyone could provide some details as to what needs to be done to fix this functionality I would be more than happy to see if I could devote some time to this.

Is there currently any other way to tie regcodes to OG module?

bryzo’s picture

I uninstalled the over version of Registration Codes so that I could install this one for the OG support, but I received the same exact error. I just reinstalled it all over and it crashed again. Any ideas? I'll look into the code later today...

bryzo’s picture

Ok, I have a temporary fix.

On line 77 of regcode_og.module: Erase the current line and paste in this line: "'#options' => regcode_get_vocab_terms(),"

Now I am getting an error which states: user warning: Table 'drupal.regcode_term' doesn't exist query: SELECT tn.rid AS node_vid, td.*, v.name as vocabulary FROM term_data td INNER JOIN regcode_term tn ON td.tid = tn.tid INNER JOIN vocabulary v ON v.vid = td.vid WHERE tn.rid IN (2) AND td.vid = 2 ORDER BY td.weight, td.name in /var/www/modules/regcode/views_handler_field_term_regcode_tid.inc on line 56.

This error has no effect on the temp fix I found, but it would be nice to get the error resolved so that users do not see it. I did test using a code and the user was successfully created and everything....now to tackle this error. It looks like a table in the database is not created...any ideas?

mdost@sharpdotinc.com’s picture

You can replace the function on line 77 with "regcode_get_vocab_terms()" and this will at lease populate a list. Not sure if we should create a new vocab just for assigning to og groups.

I noticed that this did not apply the user to the group when I used a regCode that used the tag I associated to the OG group.

mdost@sharpdotinc.com’s picture

StatusFileSize
new4.39 KB

Attached is a working file for the og registration codes.

Sorry it is not a patch file. I have not created patches before and was hoping someone could take my file and create the patch.

P.S. I had to rename it to a txt file to upload it. Just remove the txt extension.

DanielJohnston’s picture

Subscribing. Is regcodes being actively supported at the moment?

aidanlis’s picture

#7's patch removed the error but had no chance of actually working properly. I've redone the module from a term's orientated perspective, a working and tested version is available in the next release.

aidanlis’s picture

Status: Active » Fixed

Note that there is no upgrade path. You will have to uninstall the module (not just disable) and reinstall.

DanielJohnston’s picture

I'm guessing you mean there's no upgrade path for the Organic Group assignment module, rather than the entire regcode framework.

aidanlis’s picture

Right, thanks for clarifying.

Status: Fixed » Closed (fixed)
Issue tags: -error

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