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
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
Type: | Ticket |
---|---|
Status: | Archived |
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:
Furthermore, the view.php needs to be updated to:
If you are not comfortable making changes to code files then please wait for the update.
Cheers
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() ?>">
Viewing 15 lines of 23 lines. View entire code block.
If you are not comfortable making changes to code files then please wait for the update.
Cheers
Works great. Thank you!!!
Any idea when the update will be availlable?
Cheers Oliver
Any idea when the update will be availlable?
Cheers Oliver
Hopefully should be at some point this week. We just have a few more improvements to make ;)
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.
To re-open this issue, reply to this message.
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.
To re-open this issue, reply to this message.
I too am having this problem but it's on my log in page. Anybody got any ideas.
Terry