Call to a member function getFileSetID() on null

Permalink Browser Info Environment
Hello,
adding the image lightbox and a fileset worked, but since I deleted the fileset, I can not access the page anymore (Call to a member function getFileSetID() on null) As this is the home page, I need a solution how to fix this...

Cheers Oliver

1 Attachment

Type: Ticket
Status: Archived
comcon
View Replies:
tjbphoto replied on at Permalink Reply 1 Attachment
tjbphoto
Hi there
I too am having this problem but it's on my log in page. Anybody got any ideas.

Terry
c5hub replied on at Permalink Reply
c5hub
There is a fix for this that we can make available in the next update. In the mean time if you need to implement this on your site manually then there are 2 files you will need to update.

Please make sure you back up your files and database before making any changes.

The 2 files are as follows:
1.) packages/fundamental/blocks/fundamental_lightbox/controller.php
2.) packages/fundamental/blocks/fundamental_lightbox/view.php

1.) the view method in the controller.php needs to be updated to:
public function view() {
      if ($this->file_set) {
         $list = new FileList();
         $set = FileSet::getByID($this->file_set);
         if($set) {
            $list->filterBySet($set);
            $list->filterByType(FileType::T_IMAGE);
            $list->sortByFileSetDisplayOrder();
            $this->set('images', $list->get());
         }
      }
      else {
         $this->set('images', false);
      }
   }

Furthermore, the view.php needs to be updated to:
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
$ih = Loader::helper('image');
$fs = FileSet::getByID($file_set);
$fsname = $fs->fsName;
?>
<?php if ($enableTitle) {
   echo '<h4>'.$fsname.'</h4>';
}?>
<?php if ($images != false): ?>
<ul class="clearing-thumbs" data-clearing>
<?php foreach ($images as $image): ?>
<?php $thumbnail = $ih->getThumbnail($image, $thumbnailWidth, $thumbnailHeight, true); ?>
   <li>
      <a class="th" title="<?php echo $image->getTitle();?>" href="<?php echo $image->getRelativePath() ?>">

If you are not comfortable making changes to code files then please wait for the update.

Cheers
comcon replied on at Permalink Reply
comcon
Works great. Thank you!!!
Any idea when the update will be availlable?

Cheers Oliver
c5hub replied on at Permalink Reply
c5hub
Hopefully should be at some point this week. We just have a few more improvements to make ;)
admin replied on at Permalink Reply
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.
admin replied on at Permalink Reply
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

# concrete5 Version
Core Version - 8.2.1
Version Installed - 8.2.1
Database Version - 20170802000000

# concrete5 Packages
Fundamental (4.0.3), Spacer (0.9.3), SVG Social Media Icons (0.9.9)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.25 (Unix) OpenSSL/1.0.2j PHP/7.1.1 mod_perl/2.0.8-dev Perl/v5.16.3

# Server API
apache2handler

# PHP Version
7.1.1

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, Phar, posix, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 128M
sql.safe_mode - Off
upload_max_filesize - 128M
ldap.max_links - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:54.0) Gecko/20100101 Firefox/54.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.