<?php | |
use Concrete\Core\Support\Facade\Application; | |
use Concrete\Core\User\UserInfoRepository; | |
$app = Application::getFacadeApplication(); | |
/** @var UserInfoRepository $repository */ | |
$repository = $app->make(UserInfoRepository::class); | |
$updated = 0; | |
$failed = 0; |
<?php | |
defined('C5_EXECUTE') or die("Access Denied."); | |
/** @var $c \Concrete\Core\Page\Page */ | |
/** @var $container \Concrete\Core\Entity\Page\Container */ | |
use Concrete\Core\Area\ContainerArea; | |
?> | |
<div class="grid grid-cols-2 md:grid-cols-4 xl:grid-cols-5 gap-x-4 gap-y-8"> |
Concrete CMS version 8 uses jQuery 1.22.2 and jQuery UI 1.12.1, but these versions have officially been marked as the end of life. These libraries have some vulnerabilities, but the jQuery team won't fix them. They announced you should upgrade jQuery 3.5.0 or later.
The core team of Concrete CMS does not plan to update jQuery on version 8.x for backward compatibility. If you can update to Concrete CMS version 9, it'd be best to fix those vulnerabilities.
<?php | |
/** @var \Concrete\Core\Page\Page $page */ | |
$totalMessages = 0; | |
foreach ($page->getBlocks() as $block) { | |
if ($block->getBlockTypeHandle() === 'core_conversation') { | |
/** @var \Concrete\Core\Conversation\Conversation $conversation */ | |
$conversation = $block->getController()->getConversationObject(); | |
if ($conversation) { | |
$totalMessages = $conversation->getConversationMessagesTotal(); | |
} |
<?php | |
namespace Application\Controller\SinglePage; | |
use Concrete\Core\Http\ResponseFactoryInterface; | |
use Concrete\Core\Url\Resolver\Manager\ResolverManagerInterface; | |
use Concrete\Core\Url\UrlImmutable; | |
use Concrete\Core\User\User; | |
use Symfony\Component\HttpFoundation\Response; |
<?php | |
// application/src/Calendar/Event/EventService.php | |
namespace Application\Calendar\Event; | |
use Concrete\Core\Entity\Calendar\Calendar; | |
use Concrete\Core\Entity\Calendar\CalendarEvent; | |
use Concrete\Core\Entity\Calendar\CalendarEventVersion; | |
use Concrete\Core\Page\Page; | |
use Concrete\Core\Page\Type\Type; |
This script is related with migration error on upgrade from 8.5.2 or before.
You can check if there're missing migrations on your concrete5 site before upgrade it.
- Download checkMigrations.php and upload it
- Run it with
c5:exec
command
<?php | |
namespace Application\Http; | |
use Concrete\Core\Http\ResponseFactoryInterface; | |
class HttpServiceProvider extends \Concrete\Core\Http\HttpServiceProvider | |
{ | |
public function register() | |
{ | |
parent::register(); |
It should exist only one "Page Not Found" page with "/page_not_found" path on concrete5 system. However, you're able to delete that page or change the URL accidentally. You can install it from dashboard, but it won't work correctly if you enables multilingual sections. If it happened, sometimes concrete5 can't render 404 correctly and may occur an infinite loop. I got a Segmentation fault error due to this case.
This job was written for re-installing "/page_not_found" page correctly.
Please upload this restore_page_not_found.php
file into your /application/jobs
directory,
then install it from Dashboard > System & Settings > Optimization > Automated Jobs page.
After install it, just push the "Run" button.