1

In CiviVolunteer, I have two roles (perhaps 'Event Set-up' & 'Event Staffing') needed at different times (say Friday at 7pm for Set-up and Saturday at 9am for Staffing).

In my installation ( Civi 4.5.8 on Wordpress 4.1.1 ), someone can register to 'Set-up' on Saturday or to 'Staff' on Friday - The roles are not linked to the times needed.

Where do I start troubleshooting?

(I'd test on the demo, but you can't!)


Edit: I was able to test on the 4.6.1 Dupal sandbox and it does work where you must choose a role (time is hidden), then a new box appears to choose a time for that role. On mine, both the roles and times appear at the same time and inappropriate combinations are possible. I couldn't find any way demo for testing on a WP install, so I was confirming first that this is not a bug, and second, then how to fix. You said perhaps a broken script - but this is on multiple machines (& front & back end), so I assume it's my configuration somewhere. Where should I start looking to figure out the problem? Here's my a screenshot of the page:

Screenshot of Error


Edit: No Errors in browser console with backtrace and debugging turned on.


Edit: I confirmed that volunteersignup.js is at:

/primary/www/wp-content/plugins/files/civicrm/ custom /org.civicrm.volunteer/templates/CRM/Volunteer/Form

It is NOT at /custom_exe/

I double checked Extension Resource Dir:
/webroot/b/g/example/primary/www/wp-content/plugins/files/civicrm/custom_ext

Extension Resource URL: `http://example.com/wp-content/plugins/files/civicrm/custom_ext'

Changing these to other values broke many other things - These setting all follow the help prompts & book instruction from what I can tell.

Changing these to custom made no change. .I didn't find a reference to a .htaccess change - is this a file permissions change, or a file content change?


Edit:

I moved custom_exe to /wp-content/plugins/civicrm_ext.

I changed the resource dir (/webroot/b/g/example/primary/www/wp-content/plugins/civicrm_ext) & urls (http://example.org/wp-content/plugins/civicrm_ext) to the file. File has permission read access (755). I can browse to volunteersignup.js at the new location and view as an anonymous user. The file name is still not found when searching 'view source' on the sign-up page. No custom coding has been done anywhere on the site.

I cleared cache from the admin (system settings > Cleanup Cache) and from manually deleting files in template_c per wiki. (The clearcache url gave an error "You do not have sufficient permissions to access this page.")

I've also disabled all the civi extensions and wp plugins. This completes all the tasks on the troubleshooting hit list Coleman posted.

But still NO CHANGE on the form! And no errors on in the console. sigh...


Edit: I upgraded to 4.5.8 just incase there was an easy fix there. I didn't think there would be reading through the change logs - Of course, still no change...

5
  • Good question. FYI, there is a demo for civivolunteer available at civivolunteer.ginkgostreet.com
    – Joe Murray
    Commented Apr 7, 2015 at 22:21
  • Great find! Sadly, on the Ginko Street Demo, the Demo user is not given the permissions to see the front end volunteer links (arguably, the biggest reason to have a demo with the volunteer extension!). Nor does the user have permission to change the ACL's to give itself permission. Thus, I can't get to the page needed to determine if this issue can be replicated or not due to demo issues.
    – Ben
    Commented Apr 8, 2015 at 0:34
  • Yes, the demo that Joe mentioned is a bit out of date and probably not optimally configured for allowing the general public to get a feel for the tool. I should probably automate that and have it refresh once a week or so. Commented Apr 8, 2015 at 15:48
  • (Whoops, didn't mean to submit that.) Anyway, can you describe your problem in more detail, @Ben? How are folks signing up? I'm able to associate multiple times with one role, and multiple roles with a single time. On the volunteer sign-up page, users are first asked to select a role, and then the times associated with the selected role are presented to the user. If JavaScript is disabled (or broken because of another broken script on the page), then it would be possible to inappropriately mix and match roles and times. If everything is working properly, however, this shouldn't be possible. Commented Apr 8, 2015 at 15:53
  • Since your debugging efforts thus far haven't proved fruitful, it may help to post the URL in question. If you don't want to do so publicly, you may send it to me via ginkgostreet.com/contact. Commented Apr 9, 2015 at 22:20

2 Answers 2

2

Based on your updated description, it appears there's a JavaScript error of some sort in play. To begin debugging this, you'll need to open up the JavaScript console in your browser and post back any errors therein.

In Firefox and Chromium (on Ubuntu at least), you can do this by pressing the F12 key. Otherwise, in Chromium, click Tools > JavaScript Console.

3
  • No obvious errors there or in the console or logs, even with refresh or going to the event page and back to the sign up. Thanks for your patience - I'm not a coder (obviously)
    – Ben
    Commented Apr 8, 2015 at 18:12
  • 1
    Please see this troubleshooting guide
    – Coleman
    Commented Apr 8, 2015 at 18:33
  • Thanks for the Troubleshooting Guide - I turned on debugging and backtrace, went back to the event page and through the volunteer link - No messages show on screen or in console!
    – Ben
    Commented Apr 9, 2015 at 2:06
2

Ben sent me a link to his site privately, so I was able to do a little more digging around. I don't have creds to the site, so my observations are limited.

The file that's responsible for the behavior missing from the site in question lives at extensions_directory/civivolunteer_root/templates/CRM/Volunteer/Form/VolunteerSignUp.js. If things were working as they should be, you could go to the page in the screenshot, view source, and find a reference to this file in the page. As it stands, this file isn't referenced anywhere in the page. This suggests one of two things (assuming no one has modified the source):

  • Your extensions resource URL is set incorrectly. To check this:
    • Go to "Administer » System Settings » Resouce URLs".
    • Fill in "Extension Resource URL," and click "Save". Note that this URL corresponds to the same location as the "Extensions Directory" setting found under "Administer » System Settings » Directories."
  • Your extension resource URL is set correctly, but some server configuration prevents the resource from loading. I have seen this happen in Drupal sites when the extensions directory is under sites/default/files/civicrm. (If memory serves correctly, it's due to some somewhat recent changes in an .htaccess file.) I haven't tested it on WordPress, but I suspect the same would happen if the extension directory is under wp-content/plugins/files.
2
  • I confirmed that the volunteersignup.js is at /primary/www/wp-content/plugins/files/civicrm/custom/org.civicrm.volunteer/templates/CRM/Volunteer/Form
    – Ben
    Commented Apr 12, 2015 at 2:02
  • @Ben, I think the path is your problem. See comment 1 under issues.civicrm.org/jira/browse/CRM-14499. The .htaccess file in that directory restricts access to files therein. I'd recommend creating a directory at /primary/www/wp-content/plugins/ext and putting CiviVolunteer in there. After you do that, you'll need to update both your ext directory and your ext resource URL configs. For good measure, I'd also clear CiviCRM's caches. One way to do this is to go to yoursite.org/wp-admin/admin.php?page=CiviCRM/clearcache (WordPress) or yoursite.org/civicrm/clearcache (Drupal). Commented Apr 12, 2015 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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