Forum

Thread tagged as: Problem, Addons

Events app not appearing in dashboard after upgrade

Updated Perch from 2.x to 3.x and updated the apps and the Events app is not appearing in the dashboard (although the Blog and Forms apps are). What can I do to troubleshoot this?

Diagnostics:

Perch: 3.0.8, PHP: 5.6.28, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Darwin, cgi-fcgi
Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_blog (5.5.1), perch_events (1.9.5), perch_forms (1.9.1), kirk_resource_list (1.0)
App runtimes: <?php // include(PERCH_PATH.'/core/apps/content/runtime.php'); // include(PERCH_PATH.'/core/apps/categories/runtime.php'); // include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php'); // include(PERCH_PATH.'/addons/apps/perch_events/runtime.php'); // include(PERCH_PATH.'/addons/apps/perch_forms/runtime.php'); // include(PERCH_PATH.'/addons/apps/kirk_admin_links/runtime.php'); $apps_list = [ 'perch_blog', 'perch_events', 'perch_forms', 'kirk_admin_links', ]; ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/kirkroberts/Work/Codebases/[...]/code/public_html/perch
PERCH_CORE: /Users/kirkroberts/Work/Codebases/[...]/code/public_html/perch/core
PERCH_RESFILEPATH: /Users/kirkroberts/Work/Codebases/[...]/code/public_html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /Users/kirkroberts/Work/Codebases/[...]/code/public_html
HTTP_HOST: jr.dev
Kirk Roberts

Kirk Roberts 0 points

  • 4 years ago

Commenting to follow.

Hmm... I'm surprised to have no response on this. What other information can I provide?

Drew McLellan

Drew McLellan 2638 points
Perch Support

There was no response because you indicated you were going to follow up with more information, but you didn't.

What do you see under Settings > Diagnostics > Add-ons ?

 Blog 5.5.1 is up to date
 Events 1.9.5 is up to date
 Forms 1.9.1 is up to date

(p.s. — sorry, by "Commenting to follow." I meant I added a comment so I could be sure to get email notifications)

Drew McLellan

Drew McLellan 2638 points
Perch Support

It doesn't look like the Events app is installed. Have you tried replacing it?

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

I tested this in a development environment. Both Perch and Events app are up to date. The Events app does not appear in the dashboard for me either.

It looks like maybe the Events app dashboard.php hasn't been updated for Perch 3 yet. Here is a hacked-together version to use until it is officially updated (replace addons/apps/perch_events/dashboard.php with this):

<?php
    return function() {

    $API   = new PerchAPI(1.0, 'perch_events');
    $Lang  = $API->get('Lang');

    $Paging = $API->get('Paging');
    $Paging->set_per_page(10);

    $Events = new PerchEvents_Events($API);
    $events = $Events->all($Paging);

?>
<div class="widget">
  <div class="dash-content">
    <header>
      <h2><?php echo $Lang->get('Events'); ?></h2>
      <a href="<?php echo PerchUtil::html(PERCH_LOGINPATH.'/addons/apps/perch_events/edit/'); ?>" class="button button-small button-icon icon-left action-info"><div><?php echo PerchUI::icon('core/plus', 8).'<span>'.$Lang->get('Add event'); ?></span></div></a>
    </header>
    <div class="body">
      <?php
        if (PerchUtil::count($events)) {
          echo '<ul class="dash-list">';
          foreach($events as $Event) {
            echo '<li>';
              echo '<a href="'.PerchUtil::html(PERCH_LOGINPATH.'/addons/apps/perch_events/edit/?id='.$Event->id()).'">';
                echo PerchUtil::html($Event->eventTitle());
              echo '</a>';
              echo '<span class="note">'.PerchUtil::html(strftime('%d %B %Y, %l:%M %p', strtotime($Event->eventDateTime()))).'</span>';
            echo '</li>';
          }
          echo '</ul>';
        }
      ?>
    </div>
  </div>
</div>
<?php

};

?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah, you literally mean the dashboard widget. I'd missed that.

Drew McLellan said:

Ah, you literally mean the dashboard widget. I'd missed that.

No worries, it's fixed for now!