Events Add On - 'Editor' unable to add event

  • I have just upgraded to Perch 3 and installed perch events version 1.9.5.
    Whilst logged in with Admin role the 'Add Event' button appears top right of the Listing Events page but when logged in as an Editor that button does not appear.
    I have looked at the Editor role but can't see anything that would prevent the button.
    The Editor is still able to amend an existing Event.
    Any ideas what is going on?

  • drewm

    Approved the thread.
  • This appears to be an old issue see thread http://forum.grabaperch.com/fo…n-event-perch-3events-195

    it is also referenced in new thread Perch Shop Permissions


    I have added define('PERCH_PRIV_ASSIST', true); to my config/config.php file and that has made no difference to what they can do or to the list of privileges I can choose from in the Manage Roles section.


    This did work prior to the Perch 3 update, whilst I appreciate that Events is not being developed a fix is needed.

  • I have added define('PERCH_PRIV_ASSIST', true); to my config/config.php file and that has made no difference

    The way this setting works is that it starts logging an new privileges that are checked that don't already exist in the database. So once it's enabled, you'll need to make sure the privilege is checked for by visiting the page where the button should appear.

  • Production mode. I did try it on a stage development, everything had seemed OK - but I did not notice the missing button.
    I had to switch to Perch 3 to be compatible with PHP 7.2 so now am stuck and my client is waiting to use the system again, I obviously do not want to give them full Admin access and cannot see any extra Event privileges I can grant for the role - for both Admin and Editor it only shows
    Access Events
    Manage Categories


    Access Events is ticked for both roles.

  • I haven't done that before, so need some guidance - are these the steps I should follow:


    - set up test environment - mirroring the live files / database

    - Set

    PERCH_PRODUCTION_MODE to PERCH_DEVELOPMENT


    - add ('PERCH_PRIV_ASSIST', true); to the bottom of my config/config.php file


    - login in as Editor

    - Go to the Add/Edit events page (where 'Add Event' is missing)


    Login as Admin

    - Go to Roles -> Editor and the Add Event privilege should appear?


    Thanks

  • I have tried this in a test environment in Development mode


    define('PERCH_LOGINPATH', '/perch');

    define('PERCH_PATH', str_replace(DIRECTORY_SEPARATOR.'config', '', __DIR__));

    define('PERCH_CORE', PERCH_PATH.DIRECTORY_SEPARATOR.'core');


    define('PERCH_RESFILEPATH', PERCH_PATH . DIRECTORY_SEPARATOR . 'resources');

    define('PERCH_RESPATH', PERCH_LOGINPATH . '/resources');


    define('PERCH_HTML5', true);

    define('PERCH_PRIV_ASSIST', true);

    define('PERCH_PRODUCTION_MODE', 'PERCH_DEVELOPMENT');



    There is no change in the privileges displayed - see screenshot attached.


    Please let me know what needs to be done to add it manually, thanks

  • In a file on your site, add this:


    PHP
    1. <?php
    2. include('perch/runtime.php');
    3. $API = new PerchAPI(1.0, 'perch_events');
    4. $UserPrivileges = $API->get('UserPrivileges');
    5. $UserPrivileges->create_privilege('perch_events', 'Access events');
    6. $UserPrivileges->create_privilege('perch_events.categories.manage', 'Manage categories');


    And then load the page. It shouldn't appear to do anything, but hopefully it should create the privileges. If that works, you can then remove that file, it's done its job.

  • Ok, try these:


    PHP
    1. <?php
    2. include('perch/runtime.php');
    3. $API = new PerchAPI(1.0, 'perch_events');
    4. $UserPrivileges = $API->get('UserPrivileges');
    5. $UserPrivileges->create_privilege('perch_events.create', 'Create events');
    6. $UserPrivileges->create_privilege('perch_events.delete', 'Delete events');