Installed Concrete 9 just fine. On Windows 8.1 Wampserver64 3.2.9, Apache 2.4.51, MySQL 8.0.27, PHP 7.4.26.
Everything was going GREAT! Blows Wordpress away! IMO. All due respect.
Added some files…images to Gallery folder manually. The theme is Atomik latest I guess. Concrete CMS is 9.1.1.
All a sudden I go to view the main page…first…index…whatever… I get THIS:
C:\wamp64\www\cccms\concrete\themes\atomik\blocks\gallery\view.php
</div>
<?php
// Stop outputting
return;
}
?>
<div id="ccm-block-gallery-<?=$bID?>">
<div class="ccm-block-gallery">
<div class="row gx-0">
<?php
/** @var File $image */
foreach ($images as $image) {
$tag = (new Image($image['file']))->getTag();
$size = $image['displayChoices']['size']['value'] ?? null;
$caption = $image['displayChoices']['caption']['value'] ?? null;
$hoverCaption = $image['displayChoices']['hover_caption']['value'] ?? null;
$downloadLink = null;
$fileVersion = $image['file']->getApprovedVersion();
if ($includeDownloadLink && $fileVersion instanceof Version) {
$downloadLink = $fileVersion->getForceDownloadURL();
}
?>
<a class="col-md-<?php echo $size === 'wide' ? '8' : '4' ?> col-<?php echo $size === 'wide' ? '12' : '6' ?>"
href="<?php echo h($image['file']->getThumbnailUrl(null)) ?>" data-gallery-lightbox="true"
data-caption="<?=h($caption)?>"
data-download-link="<?php echo h($downloadLink); ?>">
<div class="ccm-block-gallery-image"><?php echo $tag ?></div>
<div class="ccm-block-gallery-image-overlay">
<div class="ccm-block-gallery-image-overlay-color"></div>
<div class="ccm-block-gallery-image-overlay-text"><?=h($hoverCaption)?></div>
</div>
</a>
<?php
}
?>
</div>
</div>
</div>
Arguments
- “Call to a member function getApprovedVersion() on null”
I have tried emptying cache. Rescan files. Change theme to Elemental…nothing. Still getting that ERROR on first page. The rest of the pages work. Changed back to Atomik. Downloaded a new view.php file. Compared them…exactly the same. So it isn’t the view.php file.
One thing I did that quite possibly broke that page. I deleted the several image files that were already in Gallery folder via Dashboard. However…I downloaded atomik from github and put those files back. Still ERROR on main first page. PLEASE help and advise.
Thank you.
Sincerely,
David