Username error in Contribution plugin

Hello,

I’m using the Contribution plugin.

I’d like to be able to register materials by anonymous users, but due to my site’s long domain, I get the following error;

Username: The username "anonymous0@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
" (X is my site domain) must be between 1 and 30 characters.

Omeka_Validate_Exception: Username: The username "anonymous0@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
" must be between 1 and 30 characters. in /var/www/html/omeka/application/libraries/Omeka/Record/AbstractRecord.php:533
Stack trace:
#0 /var/www/html/omeka/plugins/Contribution/controllers/ContributionController.php(531): Omeka_Record_AbstractRecord->save()
#1 /var/www/html/omeka/plugins/Contribution/controllers/ContributionController.php(206): Contribution_ContributionController->_createNewAnonymousUser()
#2 /var/www/html/omeka/plugins/Contribution/controllers/ContributionController.php(76): Contribution_ContributionController->_processForm(Array)
#3 /var/www/html/omeka/application/libraries/Zend/Controller/Action.php(516): Contribution_ContributionController->contributeAction()
#4 /var/www/html/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘contributeActio…’)
#5 /var/www/html/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#6 /var/www/html/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#7 /var/www/html/omeka/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#8 /var/www/html/omeka/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#9 /var/www/html/omeka/index.php(23): Omeka_Application->run()
#10 {main}

I think that the database controls the maximum number of characters, but which data field should I fix?

If you know of any of them, please let me know. Thank you.

I just encountered the same problem. Did you find a solution to this. My site’s email is long after the @ and it makes the 30 character limit a real problem if a guest contributor - doesn’t provide a short email or leaves blank - then it gets assigned "anonymous@xxxxxxxxxxxxxxxxxxxxxxxx.net"

If you found a work around would love to hear

I don’t remember exactly, but I modified the following php file,
/plugins/Contribution/controllers/ConstiributionController.php

And I rewrote the script, “$email = “anonymous” . $anonymousCount . “@” . $domain;”, on line 517 as follows

$email = “noname” . $anonymousCount . “@” . “xxxxx.jp”;

I rewrote the $domain part to a pseudo-mail domain. That’s because the domain name alone was over 30 characters long.

I don’t remember if there were any other rewrites, so you can try and save the data locally.

This topic was automatically closed after 250 days. New replies are no longer allowed.