0

Installation Details

  • WordPress 4.7.3
  • CiviCRM 4.7.17
  • CiviVolunteer 4.6-2.2.1
  • Angular Profiles 4.6-1.0.2
  • SparkPost 1.1 (verified working)

Problem Description

I have a CiviEvent set up. I check the box to Allow Online Registration, and after filling everything in, it won't allow me to save the changes. It tells me that I need to select a profile, but the section under "Include Profile (top of page)" there is no form field, no popup, nothing. I tried turning off CiviVolunteer to see if that was conflicting, but no dice. I do have profiles created, but none are showing. (Again, no text field, no popup, etc.)

EDIT: Added Screenshot screenshot

  • This sounds very similar to civicrm.stackexchange.com/questions/9635/… – petednz - fuzion Mar 17 '17 at 19:25
  • It would help if you provided more detail about your set up, or closed this and added your situation as a Comment (not an Answer) on the other ticket. thx – petednz - fuzion Mar 17 '17 at 19:26
  • If you are running Jetpack, it's possible that OpenGraph is interfering with the script running the page. I've had similar issues before. You can try, initially, disabling Jetpack and if that works, I would reenable it and try disabling OG with either a bit of code in your theme's functions.php file or by using a plugin. – Barbara Forbes-Lyons Mar 17 '17 at 21:26
  • @petednz-fuzion How much more detail about my setup do you need? I gave you all the info about the WP & CiviCRM versions and CiviCRM extensions and their versions. My bug doesn't seem to be anywhere close to the other problem. They're running Joomla, I'm running WordPress; they're able to see the profiles though they haven't selected one, I can't even see the profiles to select them. – msw Mar 18 '17 at 15:44
  • @BarbaraForbes-Lyons Not running Jetpack. – msw Mar 18 '17 at 15:45
0

@petednz-fuzion pointed me in the right direction with this link:

cannot select profile for online event registration after upgrading civi on Joomla

So it turns out it was the theme after all. I am using Ambition from ThemeHorse and when I tried switching the theme to see if it was a theme problem, I should've picked a default theme to test; I did not.

The offending chunk of code was somewhere in here, in functions.php:

function ambition_load_files()

I basically took the same approach in the link from @petednz-fuzion to prevent loading the functions.php file. The problem is that if the theme's functions.php isn't loaded on front-end pages where CiviCRM data is displayed (like on an event page) then the page doesn't load. So I prevented the functions.php file from loading only on backend pages like this:

function ambition_load_files()
{

    /**
     * ambition_add_files hook
     *
     * Adding other addtional files if needed.
     */
    do_action('ambition_add_files');

    /** Load functions */
    require_once (AMBITION_FUNCTIONS_DIR . '/i18n.php');
    require_once (AMBITION_FUNCTIONS_DIR . '/custom-header.php');
    require_once (AMBITION_FUNCTIONS_DIR . '/featured-content.php');
    require_once (AMBITION_ADMIN_DIR . '/ambition-metaboxes.php');
    require_once (AMBITION_FUNCTIONS_DIR . '/custom-style.php');
    require_once (AMBITION_FUNCTIONS_DIR . '/customizer.php');

    /** Load Footer Info */
    require_once (AMBITION_SHORTCODES_DIR . '/ambition-footer-info.php');

    /** Load Structure */
    require_once (AMBITION_STRUCTURE_DIR . '/header-extensions.php');
    require_once (AMBITION_STRUCTURE_DIR . '/footer-extensions.php');
    require_once (AMBITION_STRUCTURE_DIR . '/content-extensions.php');

    /** Load Widgets and Widgetized Area */
    require_once (AMBITION_WIDGETS_DIR . '/ambition-widgets.php');

    // ==========================================================================
    // We don't load functions.php if we're in the backend or else CiviCRM breaks
    $full_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    $uri = (parse_url($full_url, PHP_URL_PATH));
    if($uri == '/wp-admin/admin.php') {
        ; // don't include
    } else {
        require_once (AMBITION_FUNCTIONS_DIR . '/functions.php');
    }
    // ==========================================================================

}

Now it's working like a charm.

Thanks everyone for your help!

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.