Entity of type 'Concrete\Core\Entity\File\File' for IDs fID(xxx) was not found
Permalink 8 0 Browser Info EnvironmentRemove image file from file manager.
Page goes bye bye.
Entity of type 'Concrete\Core\Entity\File\File' for IDs fID(xxx) was not found
Backend -> sitemap -> edit is broken too.
Status: New
This was all instances of files upload to version 5.7.5 in 2017 were deleted:
$page->getAttribute('thumbnail');
was returning
DoctrineProxies\__CG__\Concrete\Core\Entity\File\File
being returned for deleted files instead of .
null
Please could this problem be fixed as a matter of urgency.
concrete/src/Application/Service/FileManager.php
line 73:
- } elseif (is_object($preselectedFile)) {
+ } elseif (get_class($preselectedFile) == 'Concrete\Core\Entity\File\File') {
concrete/src/Editor/LinkAbstractor.php
line 125:
- if ($fo !== null) {
+ if (get_class($fo) == 'Concrete\Core\Entity\File\File') {
concrete/attributes/image_file/controller.php
line 103:
- if (is_object($value)) {
+ if (get_class($value) == 'Concrete\Core\Entity\File\File' ) {
concrete/src/File/Image/BasicThumbnailer.php
line 263:
- if ($obj instanceof File) {
+ if (is_object($obj) and get_class($obj) == 'Concrete\Core\Entity\File\File' ) {
packages/open_graph_tags_lite/src/Html/OpenGraphTags.php
}
$og_image = $page->getAttribute('og_image');
- if (!is_object($og_image)) {
+ if (!get_class($og_image) == 'Concrete\Core\Entity\File\File') {
$og_image = $page->getAttribute('thumbnail');
- if (!is_object($og_image) && !empty($thumbnailID)) {
+ if (!get_class($og_image) == 'Concrete\Core\Entity\File\File' && !empty($thumbnailID)) {
$og_image = File::getByID($thumbnailID);
}
}
- if (is_object($og_image) && !$og_image->isError()) {
+ if (get_class($og_image) == 'Concrete\Core\Entity\File\File' && !$og_image->isError()) {
$og_image_width = $og_image->getAttribute('width');
$og_image_height = $og_image->getAttribute('height');
$og_image_url = $og_image->getURL();
$og_image = $page->getAttribute('og_image');
if (!get_class($og_image) == 'Concrete\Core\Entity\File\File') {
$og_image = $page->getAttribute('thumbnail');
if (!get_class($og_image) == 'Concrete\Core\Entity\File\File' && !empty($thumbnailID)) {
$og_image = File::getByID($thumbnailID);
}
}
if (get_class($og_image) == 'Concrete\Core\Entity\File\File' && !$og_image->isError()) {
$og_image_width = $og_image->getAttribute('width');
$og_image_height = $og_image->getAttribute('height');
$og_image_url = $og_image->getURL();
}
$pageTwitterCard = $page->getCollectionAttributeValue('twitter_card');
if (!$pageTwitterCard) {
if (isset($og_image_width) && $og_image_width > 280) {
$pageTwitterCard = 'summary_large_image';
} else {
$pageTwitterCard = 'summary';
}
}
Tried a few things turned on:
On - Proxy classes will be generated on the fly. Good for development.
deleted
application/config/doctrine
This folder was remade.
Tried running this code in document root:
concrete/bin/concrete5 orm:generate-proxies
Any other ideas out there welcome do not wish to keep changing the core to cope with this.
https://www.concrete5.org/community/forums/customizing_c5/deleted-im...