Running Task i18n Textcollector Task GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_ActionMenuItem;
use SilverStripe\Forms\GridField\GridField_ActionProvider;
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldFooter;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
/**
* This class is a {@link GridField} component that adds a restore action for
* versioned objects.
*/
class GridFieldRestoreAction implements GridField_ColumnProvider, GridField_ActionProvider, GridField_ActionMenuItem
{
/**
* @inheritdoc
*/
public function getTitle($gridField, $record, $columnName)
{
return _t(__CLASS__ . '.RESTORE', "Restore to draft");
}
/**
* @inheritdoc
*/
public function getGroup($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? GridField_ActionMenuItem::DEFAULT_GROUP: null;
}
/**
* @inheritdoc
*/
public function getExtraData($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->getAttributes() : [];
}
/**
* Add a column 'Delete'
*
* @param GridField $gridField
* @param array $columns
*/
public function augmentColumns($gridField, &$columns)
{
if (!in_array('Actions', $columns ?? [])) {
$columns[] = 'Actions';
}
}
/**
* Return any special attributes that will be used for FormField::create_tag()
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return array
*/
public function getColumnAttributes($gridField, $record, $columnName)
{
return ['class' => 'grid-field__col-compact'];
}
/**
* Add the title
*
* @param GridField $gridField
* @param string $columnName
* @return array
*/
public function getColumnMetadata($gridField, $columnName)
{
if ($columnName == 'Actions') {
return ['title' => ''];
}
return [];
}
/**
* Which columns are handled by this component
*
* @param GridField $gridField
* @return array
*/
public function getColumnsHandled($gridField)
{
return ['Actions'];
}
/**
* Which GridField actions are this component handling.
*
* @param GridField $gridField
* @return array
*/
public function getActions($gridField)
{
return ['restore'];
}
/**
* Creates a restore action if the action is able to be preformed
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return GridField_FormAction|null
*/
public function getRestoreAction($gridField, $record, $columnName)
{
$canRestoreToDraft = $record->canRestoreToDraft();
if ($canRestoreToDraft) {
$restoreToRoot = RestoreAction::shouldRestoreToRoot($record);
$title = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT', 'Restore to draft at top level')
: _t(RestoreAction::class . '.RESTORE', 'Restore to draft');
$description = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT_DESC', 'Restore the archived version to draft as a top level item')
: _t(RestoreAction::class . '.RESTORE_DESC', 'Restore the archived version to draft');
$field = GridField_FormAction::create(
$gridField,
'Restore' . $record->ID,
false,
"restore",
['RecordID' => $record->ID]
)
->addExtraClass('btn btn--no-text btn--icon-md font-icon-back-in-time grid-field__icon-action action-menu--handled action-restore')
->setAttribute('classNames', 'font-icon-back-in-time action-restore')
->setAttribute('data-to-root', $restoreToRoot)
->setDescription($description)
->setAttribute('aria-label', $title);
}
return isset($field) ? $field : null;
}
/**
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return string The HTML for the column
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->Field() : null;
}
/**
* Handle the actions and apply any changes to the GridField.
*
* @param GridField $gridField
* @param string $actionName
* @param mixed $arguments
* @param array $data - form data
*
* @return void
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
{
if ($actionName == 'restore') {
/** @var DataObject $item */
$item = $gridField->getList()->byID($arguments['RecordID']);
if (!$item) {
return;
}
$message = RestoreAction::restore($item);
// If this is handled in a form context then show a message
if ($message && $controller = $gridField->form->controller) {
$controller->getResponse()->addHeader('X-Message-Text', $message['text']);
$controller->getResponse()->addHeader('X-Message-Type', $message['type']);
}
$gridField->getList()->remove($item);
}
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/GridFieldRestoreAction.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Restore to draft at top level, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_ActionMenuItem;
use SilverStripe\Forms\GridField\GridField_ActionProvider;
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldFooter;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
/**
* This class is a {@link GridField} component that adds a restore action for
* versioned objects.
*/
class GridFieldRestoreAction implements GridField_ColumnProvider, GridField_ActionProvider, GridField_ActionMenuItem
{
/**
* @inheritdoc
*/
public function getTitle($gridField, $record, $columnName)
{
return _t(__CLASS__ . '.RESTORE', "Restore to draft");
}
/**
* @inheritdoc
*/
public function getGroup($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? GridField_ActionMenuItem::DEFAULT_GROUP: null;
}
/**
* @inheritdoc
*/
public function getExtraData($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->getAttributes() : [];
}
/**
* Add a column 'Delete'
*
* @param GridField $gridField
* @param array $columns
*/
public function augmentColumns($gridField, &$columns)
{
if (!in_array('Actions', $columns ?? [])) {
$columns[] = 'Actions';
}
}
/**
* Return any special attributes that will be used for FormField::create_tag()
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return array
*/
public function getColumnAttributes($gridField, $record, $columnName)
{
return ['class' => 'grid-field__col-compact'];
}
/**
* Add the title
*
* @param GridField $gridField
* @param string $columnName
* @return array
*/
public function getColumnMetadata($gridField, $columnName)
{
if ($columnName == 'Actions') {
return ['title' => ''];
}
return [];
}
/**
* Which columns are handled by this component
*
* @param GridField $gridField
* @return array
*/
public function getColumnsHandled($gridField)
{
return ['Actions'];
}
/**
* Which GridField actions are this component handling.
*
* @param GridField $gridField
* @return array
*/
public function getActions($gridField)
{
return ['restore'];
}
/**
* Creates a restore action if the action is able to be preformed
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return GridField_FormAction|null
*/
public function getRestoreAction($gridField, $record, $columnName)
{
$canRestoreToDraft = $record->canRestoreToDraft();
if ($canRestoreToDraft) {
$restoreToRoot = RestoreAction::shouldRestoreToRoot($record);
$title = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT', 'Restore to draft at top level')
: _t(RestoreAction::class . '.RESTORE', 'Restore to draft');
$description = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT_DESC', 'Restore the archived version to draft as a top level item')
: _t(RestoreAction::class . '.RESTORE_DESC', 'Restore the archived version to draft');
$field = GridField_FormAction::create(
$gridField,
'Restore' . $record->ID,
false,
"restore",
['RecordID' => $record->ID]
)
->addExtraClass('btn btn--no-text btn--icon-md font-icon-back-in-time grid-field__icon-action action-menu--handled action-restore')
->setAttribute('classNames', 'font-icon-back-in-time action-restore')
->setAttribute('data-to-root', $restoreToRoot)
->setDescription($description)
->setAttribute('aria-label', $title);
}
return isset($field) ? $field : null;
}
/**
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return string The HTML for the column
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->Field() : null;
}
/**
* Handle the actions and apply any changes to the GridField.
*
* @param GridField $gridField
* @param string $actionName
* @param mixed $arguments
* @param array $data - form data
*
* @return void
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
{
if ($actionName == 'restore') {
/** @var DataObject $item */
$item = $gridField->getList()->byID($arguments['RecordID']);
if (!$item) {
return;
}
$message = RestoreAction::restore($item);
// If this is handled in a form context then show a message
if ($message && $controller = $gridField->form->controller) {
$controller->getResponse()->addHeader('X-Message-Text', $message['text']);
$controller->getResponse()->addHeader('X-Message-Type', $message['type']);
}
$gridField->getList()->remove($item);
}
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/GridFieldRestoreAction.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_ActionMenuItem;
use SilverStripe\Forms\GridField\GridField_ActionProvider;
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldFooter;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
/**
* This class is a {@link GridField} component that adds a restore action for
* versioned objects.
*/
class GridFieldRestoreAction implements GridField_ColumnProvider, GridField_ActionProvider, GridField_ActionMenuItem
{
/**
* @inheritdoc
*/
public function getTitle($gridField, $record, $columnName)
{
return _t(__CLASS__ . '.RESTORE', "Restore to draft");
}
/**
* @inheritdoc
*/
public function getGroup($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? GridField_ActionMenuItem::DEFAULT_GROUP: null;
}
/**
* @inheritdoc
*/
public function getExtraData($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->getAttributes() : [];
}
/**
* Add a column 'Delete'
*
* @param GridField $gridField
* @param array $columns
*/
public function augmentColumns($gridField, &$columns)
{
if (!in_array('Actions', $columns ?? [])) {
$columns[] = 'Actions';
}
}
/**
* Return any special attributes that will be used for FormField::create_tag()
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return array
*/
public function getColumnAttributes($gridField, $record, $columnName)
{
return ['class' => 'grid-field__col-compact'];
}
/**
* Add the title
*
* @param GridField $gridField
* @param string $columnName
* @return array
*/
public function getColumnMetadata($gridField, $columnName)
{
if ($columnName == 'Actions') {
return ['title' => ''];
}
return [];
}
/**
* Which columns are handled by this component
*
* @param GridField $gridField
* @return array
*/
public function getColumnsHandled($gridField)
{
return ['Actions'];
}
/**
* Which GridField actions are this component handling.
*
* @param GridField $gridField
* @return array
*/
public function getActions($gridField)
{
return ['restore'];
}
/**
* Creates a restore action if the action is able to be preformed
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return GridField_FormAction|null
*/
public function getRestoreAction($gridField, $record, $columnName)
{
$canRestoreToDraft = $record->canRestoreToDraft();
if ($canRestoreToDraft) {
$restoreToRoot = RestoreAction::shouldRestoreToRoot($record);
$title = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT', 'Restore to draft at top level')
: _t(RestoreAction::class . '.RESTORE', 'Restore to draft');
$description = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT_DESC', 'Restore the archived version to draft as a top level item')
: _t(RestoreAction::class . '.RESTORE_DESC', 'Restore the archived version to draft');
$field = GridField_FormAction::create(
$gridField,
'Restore' . $record->ID,
false,
"restore",
['RecordID' => $record->ID]
)
->addExtraClass('btn btn--no-text btn--icon-md font-icon-back-in-time grid-field__icon-action action-menu--handled action-restore')
->setAttribute('classNames', 'font-icon-back-in-time action-restore')
->setAttribute('data-to-root', $restoreToRoot)
->setDescription($description)
->setAttribute('aria-label', $title);
}
return isset($field) ? $field : null;
}
/**
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return string The HTML for the column
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->Field() : null;
}
/**
* Handle the actions and apply any changes to the GridField.
*
* @param GridField $gridField
* @param string $actionName
* @param mixed $arguments
* @param array $data - form data
*
* @return void
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
{
if ($actionName == 'restore') {
/** @var DataObject $item */
$item = $gridField->getList()->byID($arguments['RecordID']);
if (!$item) {
return;
}
$message = RestoreAction::restore($item);
// If this is handled in a form context then show a message
if ($message && $controller = $gridField->form->controller) {
$controller->getResponse()->addHeader('X-Message-Text', $message['text']);
$controller->getResponse()->addHeader('X-Message-Type', $message['type']);
}
$gridField->getList()->remove($item);
}
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/GridFieldRestoreAction.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Restore to draft, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_ActionMenuItem;
use SilverStripe\Forms\GridField\GridField_ActionProvider;
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldFooter;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
/**
* This class is a {@link GridField} component that adds a restore action for
* versioned objects.
*/
class GridFieldRestoreAction implements GridField_ColumnProvider, GridField_ActionProvider, GridField_ActionMenuItem
{
/**
* @inheritdoc
*/
public function getTitle($gridField, $record, $columnName)
{
return _t(__CLASS__ . '.RESTORE', "Restore to draft");
}
/**
* @inheritdoc
*/
public function getGroup($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? GridField_ActionMenuItem::DEFAULT_GROUP: null;
}
/**
* @inheritdoc
*/
public function getExtraData($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->getAttributes() : [];
}
/**
* Add a column 'Delete'
*
* @param GridField $gridField
* @param array $columns
*/
public function augmentColumns($gridField, &$columns)
{
if (!in_array('Actions', $columns ?? [])) {
$columns[] = 'Actions';
}
}
/**
* Return any special attributes that will be used for FormField::create_tag()
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return array
*/
public function getColumnAttributes($gridField, $record, $columnName)
{
return ['class' => 'grid-field__col-compact'];
}
/**
* Add the title
*
* @param GridField $gridField
* @param string $columnName
* @return array
*/
public function getColumnMetadata($gridField, $columnName)
{
if ($columnName == 'Actions') {
return ['title' => ''];
}
return [];
}
/**
* Which columns are handled by this component
*
* @param GridField $gridField
* @return array
*/
public function getColumnsHandled($gridField)
{
return ['Actions'];
}
/**
* Which GridField actions are this component handling.
*
* @param GridField $gridField
* @return array
*/
public function getActions($gridField)
{
return ['restore'];
}
/**
* Creates a restore action if the action is able to be preformed
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return GridField_FormAction|null
*/
public function getRestoreAction($gridField, $record, $columnName)
{
$canRestoreToDraft = $record->canRestoreToDraft();
if ($canRestoreToDraft) {
$restoreToRoot = RestoreAction::shouldRestoreToRoot($record);
$title = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT', 'Restore to draft at top level')
: _t(RestoreAction::class . '.RESTORE', 'Restore to draft');
$description = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT_DESC', 'Restore the archived version to draft as a top level item')
: _t(RestoreAction::class . '.RESTORE_DESC', 'Restore the archived version to draft');
$field = GridField_FormAction::create(
$gridField,
'Restore' . $record->ID,
false,
"restore",
['RecordID' => $record->ID]
)
->addExtraClass('btn btn--no-text btn--icon-md font-icon-back-in-time grid-field__icon-action action-menu--handled action-restore')
->setAttribute('classNames', 'font-icon-back-in-time action-restore')
->setAttribute('data-to-root', $restoreToRoot)
->setDescription($description)
->setAttribute('aria-label', $title);
}
return isset($field) ? $field : null;
}
/**
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return string The HTML for the column
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->Field() : null;
}
/**
* Handle the actions and apply any changes to the GridField.
*
* @param GridField $gridField
* @param string $actionName
* @param mixed $arguments
* @param array $data - form data
*
* @return void
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
{
if ($actionName == 'restore') {
/** @var DataObject $item */
$item = $gridField->getList()->byID($arguments['RecordID']);
if (!$item) {
return;
}
$message = RestoreAction::restore($item);
// If this is handled in a form context then show a message
if ($message && $controller = $gridField->form->controller) {
$controller->getResponse()->addHeader('X-Message-Text', $message['text']);
$controller->getResponse()->addHeader('X-Message-Type', $message['type']);
}
$gridField->getList()->remove($item);
}
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/GridFieldRestoreAction.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_ActionMenuItem;
use SilverStripe\Forms\GridField\GridField_ActionProvider;
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldFooter;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
/**
* This class is a {@link GridField} component that adds a restore action for
* versioned objects.
*/
class GridFieldRestoreAction implements GridField_ColumnProvider, GridField_ActionProvider, GridField_ActionMenuItem
{
/**
* @inheritdoc
*/
public function getTitle($gridField, $record, $columnName)
{
return _t(__CLASS__ . '.RESTORE', "Restore to draft");
}
/**
* @inheritdoc
*/
public function getGroup($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? GridField_ActionMenuItem::DEFAULT_GROUP: null;
}
/**
* @inheritdoc
*/
public function getExtraData($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->getAttributes() : [];
}
/**
* Add a column 'Delete'
*
* @param GridField $gridField
* @param array $columns
*/
public function augmentColumns($gridField, &$columns)
{
if (!in_array('Actions', $columns ?? [])) {
$columns[] = 'Actions';
}
}
/**
* Return any special attributes that will be used for FormField::create_tag()
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return array
*/
public function getColumnAttributes($gridField, $record, $columnName)
{
return ['class' => 'grid-field__col-compact'];
}
/**
* Add the title
*
* @param GridField $gridField
* @param string $columnName
* @return array
*/
public function getColumnMetadata($gridField, $columnName)
{
if ($columnName == 'Actions') {
return ['title' => ''];
}
return [];
}
/**
* Which columns are handled by this component
*
* @param GridField $gridField
* @return array
*/
public function getColumnsHandled($gridField)
{
return ['Actions'];
}
/**
* Which GridField actions are this component handling.
*
* @param GridField $gridField
* @return array
*/
public function getActions($gridField)
{
return ['restore'];
}
/**
* Creates a restore action if the action is able to be preformed
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return GridField_FormAction|null
*/
public function getRestoreAction($gridField, $record, $columnName)
{
$canRestoreToDraft = $record->canRestoreToDraft();
if ($canRestoreToDraft) {
$restoreToRoot = RestoreAction::shouldRestoreToRoot($record);
$title = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT', 'Restore to draft at top level')
: _t(RestoreAction::class . '.RESTORE', 'Restore to draft');
$description = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT_DESC', 'Restore the archived version to draft as a top level item')
: _t(RestoreAction::class . '.RESTORE_DESC', 'Restore the archived version to draft');
$field = GridField_FormAction::create(
$gridField,
'Restore' . $record->ID,
false,
"restore",
['RecordID' => $record->ID]
)
->addExtraClass('btn btn--no-text btn--icon-md font-icon-back-in-time grid-field__icon-action action-menu--handled action-restore')
->setAttribute('classNames', 'font-icon-back-in-time action-restore')
->setAttribute('data-to-root', $restoreToRoot)
->setDescription($description)
->setAttribute('aria-label', $title);
}
return isset($field) ? $field : null;
}
/**
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return string The HTML for the column
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->Field() : null;
}
/**
* Handle the actions and apply any changes to the GridField.
*
* @param GridField $gridField
* @param string $actionName
* @param mixed $arguments
* @param array $data - form data
*
* @return void
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
{
if ($actionName == 'restore') {
/** @var DataObject $item */
$item = $gridField->getList()->byID($arguments['RecordID']);
if (!$item) {
return;
}
$message = RestoreAction::restore($item);
// If this is handled in a form context then show a message
if ($message && $controller = $gridField->form->controller) {
$controller->getResponse()->addHeader('X-Message-Text', $message['text']);
$controller->getResponse()->addHeader('X-Message-Type', $message['type']);
}
$gridField->getList()->remove($item);
}
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/GridFieldRestoreAction.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Restore the archived version to draft as a top level item, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_ActionMenuItem;
use SilverStripe\Forms\GridField\GridField_ActionProvider;
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldFooter;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
/**
* This class is a {@link GridField} component that adds a restore action for
* versioned objects.
*/
class GridFieldRestoreAction implements GridField_ColumnProvider, GridField_ActionProvider, GridField_ActionMenuItem
{
/**
* @inheritdoc
*/
public function getTitle($gridField, $record, $columnName)
{
return _t(__CLASS__ . '.RESTORE', "Restore to draft");
}
/**
* @inheritdoc
*/
public function getGroup($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? GridField_ActionMenuItem::DEFAULT_GROUP: null;
}
/**
* @inheritdoc
*/
public function getExtraData($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->getAttributes() : [];
}
/**
* Add a column 'Delete'
*
* @param GridField $gridField
* @param array $columns
*/
public function augmentColumns($gridField, &$columns)
{
if (!in_array('Actions', $columns ?? [])) {
$columns[] = 'Actions';
}
}
/**
* Return any special attributes that will be used for FormField::create_tag()
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return array
*/
public function getColumnAttributes($gridField, $record, $columnName)
{
return ['class' => 'grid-field__col-compact'];
}
/**
* Add the title
*
* @param GridField $gridField
* @param string $columnName
* @return array
*/
public function getColumnMetadata($gridField, $columnName)
{
if ($columnName == 'Actions') {
return ['title' => ''];
}
return [];
}
/**
* Which columns are handled by this component
*
* @param GridField $gridField
* @return array
*/
public function getColumnsHandled($gridField)
{
return ['Actions'];
}
/**
* Which GridField actions are this component handling.
*
* @param GridField $gridField
* @return array
*/
public function getActions($gridField)
{
return ['restore'];
}
/**
* Creates a restore action if the action is able to be preformed
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return GridField_FormAction|null
*/
public function getRestoreAction($gridField, $record, $columnName)
{
$canRestoreToDraft = $record->canRestoreToDraft();
if ($canRestoreToDraft) {
$restoreToRoot = RestoreAction::shouldRestoreToRoot($record);
$title = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT', 'Restore to draft at top level')
: _t(RestoreAction::class . '.RESTORE', 'Restore to draft');
$description = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT_DESC', 'Restore the archived version to draft as a top level item')
: _t(RestoreAction::class . '.RESTORE_DESC', 'Restore the archived version to draft');
$field = GridField_FormAction::create(
$gridField,
'Restore' . $record->ID,
false,
"restore",
['RecordID' => $record->ID]
)
->addExtraClass('btn btn--no-text btn--icon-md font-icon-back-in-time grid-field__icon-action action-menu--handled action-restore')
->setAttribute('classNames', 'font-icon-back-in-time action-restore')
->setAttribute('data-to-root', $restoreToRoot)
->setDescription($description)
->setAttribute('aria-label', $title);
}
return isset($field) ? $field : null;
}
/**
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return string The HTML for the column
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->Field() : null;
}
/**
* Handle the actions and apply any changes to the GridField.
*
* @param GridField $gridField
* @param string $actionName
* @param mixed $arguments
* @param array $data - form data
*
* @return void
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
{
if ($actionName == 'restore') {
/** @var DataObject $item */
$item = $gridField->getList()->byID($arguments['RecordID']);
if (!$item) {
return;
}
$message = RestoreAction::restore($item);
// If this is handled in a form context then show a message
if ($message && $controller = $gridField->form->controller) {
$controller->getResponse()->addHeader('X-Message-Text', $message['text']);
$controller->getResponse()->addHeader('X-Message-Type', $message['type']);
}
$gridField->getList()->remove($item);
}
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/GridFieldRestoreAction.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_ActionMenuItem;
use SilverStripe\Forms\GridField\GridField_ActionProvider;
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldFooter;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
/**
* This class is a {@link GridField} component that adds a restore action for
* versioned objects.
*/
class GridFieldRestoreAction implements GridField_ColumnProvider, GridField_ActionProvider, GridField_ActionMenuItem
{
/**
* @inheritdoc
*/
public function getTitle($gridField, $record, $columnName)
{
return _t(__CLASS__ . '.RESTORE', "Restore to draft");
}
/**
* @inheritdoc
*/
public function getGroup($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? GridField_ActionMenuItem::DEFAULT_GROUP: null;
}
/**
* @inheritdoc
*/
public function getExtraData($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->getAttributes() : [];
}
/**
* Add a column 'Delete'
*
* @param GridField $gridField
* @param array $columns
*/
public function augmentColumns($gridField, &$columns)
{
if (!in_array('Actions', $columns ?? [])) {
$columns[] = 'Actions';
}
}
/**
* Return any special attributes that will be used for FormField::create_tag()
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return array
*/
public function getColumnAttributes($gridField, $record, $columnName)
{
return ['class' => 'grid-field__col-compact'];
}
/**
* Add the title
*
* @param GridField $gridField
* @param string $columnName
* @return array
*/
public function getColumnMetadata($gridField, $columnName)
{
if ($columnName == 'Actions') {
return ['title' => ''];
}
return [];
}
/**
* Which columns are handled by this component
*
* @param GridField $gridField
* @return array
*/
public function getColumnsHandled($gridField)
{
return ['Actions'];
}
/**
* Which GridField actions are this component handling.
*
* @param GridField $gridField
* @return array
*/
public function getActions($gridField)
{
return ['restore'];
}
/**
* Creates a restore action if the action is able to be preformed
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return GridField_FormAction|null
*/
public function getRestoreAction($gridField, $record, $columnName)
{
$canRestoreToDraft = $record->canRestoreToDraft();
if ($canRestoreToDraft) {
$restoreToRoot = RestoreAction::shouldRestoreToRoot($record);
$title = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT', 'Restore to draft at top level')
: _t(RestoreAction::class . '.RESTORE', 'Restore to draft');
$description = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT_DESC', 'Restore the archived version to draft as a top level item')
: _t(RestoreAction::class . '.RESTORE_DESC', 'Restore the archived version to draft');
$field = GridField_FormAction::create(
$gridField,
'Restore' . $record->ID,
false,
"restore",
['RecordID' => $record->ID]
)
->addExtraClass('btn btn--no-text btn--icon-md font-icon-back-in-time grid-field__icon-action action-menu--handled action-restore')
->setAttribute('classNames', 'font-icon-back-in-time action-restore')
->setAttribute('data-to-root', $restoreToRoot)
->setDescription($description)
->setAttribute('aria-label', $title);
}
return isset($field) ? $field : null;
}
/**
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return string The HTML for the column
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->Field() : null;
}
/**
* Handle the actions and apply any changes to the GridField.
*
* @param GridField $gridField
* @param string $actionName
* @param mixed $arguments
* @param array $data - form data
*
* @return void
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
{
if ($actionName == 'restore') {
/** @var DataObject $item */
$item = $gridField->getList()->byID($arguments['RecordID']);
if (!$item) {
return;
}
$message = RestoreAction::restore($item);
// If this is handled in a form context then show a message
if ($message && $controller = $gridField->form->controller) {
$controller->getResponse()->addHeader('X-Message-Text', $message['text']);
$controller->getResponse()->addHeader('X-Message-Type', $message['type']);
}
$gridField->getList()->remove($item);
}
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/GridFieldRestoreAction.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Restore the archived version to draft, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_ActionMenuItem;
use SilverStripe\Forms\GridField\GridField_ActionProvider;
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldFooter;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
/**
* This class is a {@link GridField} component that adds a restore action for
* versioned objects.
*/
class GridFieldRestoreAction implements GridField_ColumnProvider, GridField_ActionProvider, GridField_ActionMenuItem
{
/**
* @inheritdoc
*/
public function getTitle($gridField, $record, $columnName)
{
return _t(__CLASS__ . '.RESTORE', "Restore to draft");
}
/**
* @inheritdoc
*/
public function getGroup($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? GridField_ActionMenuItem::DEFAULT_GROUP: null;
}
/**
* @inheritdoc
*/
public function getExtraData($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->getAttributes() : [];
}
/**
* Add a column 'Delete'
*
* @param GridField $gridField
* @param array $columns
*/
public function augmentColumns($gridField, &$columns)
{
if (!in_array('Actions', $columns ?? [])) {
$columns[] = 'Actions';
}
}
/**
* Return any special attributes that will be used for FormField::create_tag()
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return array
*/
public function getColumnAttributes($gridField, $record, $columnName)
{
return ['class' => 'grid-field__col-compact'];
}
/**
* Add the title
*
* @param GridField $gridField
* @param string $columnName
* @return array
*/
public function getColumnMetadata($gridField, $columnName)
{
if ($columnName == 'Actions') {
return ['title' => ''];
}
return [];
}
/**
* Which columns are handled by this component
*
* @param GridField $gridField
* @return array
*/
public function getColumnsHandled($gridField)
{
return ['Actions'];
}
/**
* Which GridField actions are this component handling.
*
* @param GridField $gridField
* @return array
*/
public function getActions($gridField)
{
return ['restore'];
}
/**
* Creates a restore action if the action is able to be preformed
*
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return GridField_FormAction|null
*/
public function getRestoreAction($gridField, $record, $columnName)
{
$canRestoreToDraft = $record->canRestoreToDraft();
if ($canRestoreToDraft) {
$restoreToRoot = RestoreAction::shouldRestoreToRoot($record);
$title = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT', 'Restore to draft at top level')
: _t(RestoreAction::class . '.RESTORE', 'Restore to draft');
$description = $restoreToRoot
? _t(RestoreAction::class . '.RESTORE_TO_ROOT_DESC', 'Restore the archived version to draft as a top level item')
: _t(RestoreAction::class . '.RESTORE_DESC', 'Restore the archived version to draft');
$field = GridField_FormAction::create(
$gridField,
'Restore' . $record->ID,
false,
"restore",
['RecordID' => $record->ID]
)
->addExtraClass('btn btn--no-text btn--icon-md font-icon-back-in-time grid-field__icon-action action-menu--handled action-restore')
->setAttribute('classNames', 'font-icon-back-in-time action-restore')
->setAttribute('data-to-root', $restoreToRoot)
->setDescription($description)
->setAttribute('aria-label', $title);
}
return isset($field) ? $field : null;
}
/**
* @param GridField $gridField
* @param DataObject $record
* @param string $columnName
* @return string The HTML for the column
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = $this->getRestoreAction($gridField, $record, $columnName);
return $field ? $field->Field() : null;
}
/**
* Handle the actions and apply any changes to the GridField.
*
* @param GridField $gridField
* @param string $actionName
* @param mixed $arguments
* @param array $data - form data
*
* @return void
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
{
if ($actionName == 'restore') {
/** @var DataObject $item */
$item = $gridField->getList()->byID($arguments['RecordID']);
if (!$item) {
return;
}
$message = RestoreAction::restore($item);
// If this is handled in a form context then show a message
if ($message && $controller = $gridField->form->controller) {
$controller->getResponse()->addHeader('X-Message-Text', $message['text']);
$controller->getResponse()->addHeader('X-Message-Type', $message['type']);
}
$gridField->getList()->remove($item);
}
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/GridFieldRestoreAction.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\View\ArrayData;
use SilverStripe\View\SSViewer;
/**
* Provides versioned dataobject support to {@see GridFieldDetailForm_ItemRequest}
*
* @property GridFieldDetailForm_ItemRequest $owner
*/
class VersionedGridFieldItemRequest extends GridFieldDetailForm_ItemRequest
{
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
$status = $this->getRecordStatus();
$badge = null;
if ($status) {
// Generate badge
$badge = DBField::create_field('HTMLFragment', sprintf(
'<span class="badge version-status version-status--%s">%s</span>',
$status['class'],
$status['title']
));
}
$this->extend('updateBadge', $badge);
if ($badge) {
/** @var ArrayData $lastItem */
$lastItem = $items->last();
$lastItem->setField('Extra', $badge);
}
return $items;
}
/**
* @return FieldList
*/
protected function getFormActions()
{
// Check if record is versionable
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$ownerIsStaged = $record
&& $record->hasExtension(Versioned::class)
&& $record->hasStages();
$ownerRecursivePublishes = !$ownerIsStaged
&& $record
&& $record->hasExtension(RecursivePublishable::class)
&& $record->config()->get('owns');
// Add extra actions prior to extensions so that these can be modified too
if ($ownerIsStaged) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addVersionedButtons($record, $actions);
}
);
} elseif ($ownerRecursivePublishes) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addUnversionedButtons($record, $actions);
}
);
}
return parent::getFormActions();
}
/**
* If a record is recursive publishable, but not versioned, all saves should trigger a recursive publish.
*
* @param array $data
* @param Form $form
* @return DataObject $record
*/
public function saveFormIntoRecord($data, $form)
{
$record = parent::saveFormIntoRecord($data, $form);
// Note: Don't publish if versioned, since that's a separate action
$ownerIsVersioned = $record && $record->hasExtension(Versioned::class);
$ownerIsPublishable = $record && $record->hasExtension(RecursivePublishable::class);
if ($ownerIsPublishable && !$ownerIsVersioned) {
/** @var RecursivePublishable $record */
$record->publishRecursive();
}
return $record;
}
/**
* Archive this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doArchive($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canArchive()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doArchive();
$message = _t(
__CLASS__ . '.Archived',
'Archived {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
//when an item is deleted, redirect to the parent controller
$controller = $this->getToplevelController();
$controller->getRequest()->addHeader('X-Pjax', 'Content'); // Force a content refresh
return $controller->redirect($this->getBackLink(), 302); //redirect back to admin section
}
/**
* Publish this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doPublish($data, $form)
{
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$isNewRecord = $record->ID == 0;
// Check permission
if (!$record->canPublish()) {
return $this->httpError(403);
}
// Initial save and reload
$record = $this->saveFormIntoRecord($data, $form);
$record->publishRecursive();
$editURL = $this->Link('edit');
$xmlTitle = Convert::raw2xml($record->Title);
$link = "<a href=\"{$editURL}\">{$xmlTitle}</a>";
$message = _t(
__CLASS__ . '.Published',
'Published {name} {link}',
[
'name' => $record->i18n_singular_name(),
'link' => $link
]
);
$this->setFormMessage($form, $message);
return $this->redirectAfterSave($isNewRecord);
}
/**
* Delete this record from the live site
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doUnpublish($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canUnpublish()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doUnpublish();
$message = _t(
__CLASS__ . '.Unpublished',
'Unpublished {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
// Redirect back to edit
return $this->redirectAfterSave(false);
}
/**
* @param Form $form
* @param string $message
*/
protected function setFormMessage($form, $message)
{
$form->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
$controller = $this->getToplevelController();
if ($controller->hasMethod('getEditForm')) {
/** @var Form $backForm */
$backForm = $controller->getEditForm();
$backForm->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
}
}
/**
* Return list of class / title to add on the end of record status in breadcrumbs
*
* @return array|null
*/
protected function getRecordStatus()
{
/** @var DataObject|Versioned $record */
$record = $this->record;
// No status if un-versioned
if (!$this->record->hasExtension(Versioned::class)) {
return null;
}
if ($record->isOnDraftOnly()) {
return [
'class' => 'addedtodraft',
'title' => _t(__CLASS__ . '.DRAFT', 'Draft')
];
}
if ($record->isModifiedOnDraft()) {
return [
'class' => 'modified',
'title' => _t(__CLASS__ . '.MODIFIED', 'Modified')
];
}
return null;
}
/**
* Getting buttons that are for versioned objects
*
* @param DataObject|Versioned|RecursivePublishable $record
* @param FieldList $actions
*/
protected function addVersionedButtons(DataObject $record, FieldList $actions)
{
// Get status of the object
$isOnDraft = $record->isOnDraft();
$isPublished = $record->isPublished();
$stagesDiffer = $record->stagesDiffer();
// Check permissions
$canPublish = $record->canPublish();
$canUnpublish = $record->canUnpublish();
$canEdit = $record->canEdit();
$canArchive = $record->canArchive();
// "save", supports an alternate state that is still clickable, but notifies the user that the action is not needed.
$noChangesClasses = 'btn-outline-primary font-icon-tick';
/** @var DataObject|Versioned|RecursivePublishable $liveRecord */
$liveRecord = Versioned::get_by_stage(get_class($record), Versioned::LIVE)->byID($record->ID);
$majorActions = $actions->fieldByName('MajorActions');
// "more options" action
$rootTabSet = TabSet::create('ActionMenus');
$moreOptions = Tab::create(
'MoreOptions',
_t(self::class . '.MoreOptions', 'More options', 'Expands a view for more buttons')
);
$moreOptions->addExtraClass('popover-actions-simulate');
$rootTabSet->push($moreOptions);
$rootTabSet->addExtraClass('ss-ui-action-tabset action-menus noborder');
$infoTemplate = SSViewer::get_templates_by_class(get_class($record), '_Information', DataObject::class);
$moreOptions->push(
LiteralField::create(
'Information',
$record->customise([
'Live' => $liveRecord,
'ExistsOnLive' => $isPublished
])->renderWith($infoTemplate)
)
);
..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/VersionedGridFieldItemRequest.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Save draft, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\View\ArrayData;
use SilverStripe\View\SSViewer;
/**
* Provides versioned dataobject support to {@see GridFieldDetailForm_ItemRequest}
*
* @property GridFieldDetailForm_ItemRequest $owner
*/
class VersionedGridFieldItemRequest extends GridFieldDetailForm_ItemRequest
{
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
$status = $this->getRecordStatus();
$badge = null;
if ($status) {
// Generate badge
$badge = DBField::create_field('HTMLFragment', sprintf(
'<span class="badge version-status version-status--%s">%s</span>',
$status['class'],
$status['title']
));
}
$this->extend('updateBadge', $badge);
if ($badge) {
/** @var ArrayData $lastItem */
$lastItem = $items->last();
$lastItem->setField('Extra', $badge);
}
return $items;
}
/**
* @return FieldList
*/
protected function getFormActions()
{
// Check if record is versionable
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$ownerIsStaged = $record
&& $record->hasExtension(Versioned::class)
&& $record->hasStages();
$ownerRecursivePublishes = !$ownerIsStaged
&& $record
&& $record->hasExtension(RecursivePublishable::class)
&& $record->config()->get('owns');
// Add extra actions prior to extensions so that these can be modified too
if ($ownerIsStaged) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addVersionedButtons($record, $actions);
}
);
} elseif ($ownerRecursivePublishes) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addUnversionedButtons($record, $actions);
}
);
}
return parent::getFormActions();
}
/**
* If a record is recursive publishable, but not versioned, all saves should trigger a recursive publish.
*
* @param array $data
* @param Form $form
* @return DataObject $record
*/
public function saveFormIntoRecord($data, $form)
{
$record = parent::saveFormIntoRecord($data, $form);
// Note: Don't publish if versioned, since that's a separate action
$ownerIsVersioned = $record && $record->hasExtension(Versioned::class);
$ownerIsPublishable = $record && $record->hasExtension(RecursivePublishable::class);
if ($ownerIsPublishable && !$ownerIsVersioned) {
/** @var RecursivePublishable $record */
$record->publishRecursive();
}
return $record;
}
/**
* Archive this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doArchive($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canArchive()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doArchive();
$message = _t(
__CLASS__ . '.Archived',
'Archived {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
//when an item is deleted, redirect to the parent controller
$controller = $this->getToplevelController();
$controller->getRequest()->addHeader('X-Pjax', 'Content'); // Force a content refresh
return $controller->redirect($this->getBackLink(), 302); //redirect back to admin section
}
/**
* Publish this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doPublish($data, $form)
{
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$isNewRecord = $record->ID == 0;
// Check permission
if (!$record->canPublish()) {
return $this->httpError(403);
}
// Initial save and reload
$record = $this->saveFormIntoRecord($data, $form);
$record->publishRecursive();
$editURL = $this->Link('edit');
$xmlTitle = Convert::raw2xml($record->Title);
$link = "<a href=\"{$editURL}\">{$xmlTitle}</a>";
$message = _t(
__CLASS__ . '.Published',
'Published {name} {link}',
[
'name' => $record->i18n_singular_name(),
'link' => $link
]
);
$this->setFormMessage($form, $message);
return $this->redirectAfterSave($isNewRecord);
}
/**
* Delete this record from the live site
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doUnpublish($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canUnpublish()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doUnpublish();
$message = _t(
__CLASS__ . '.Unpublished',
'Unpublished {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
// Redirect back to edit
return $this->redirectAfterSave(false);
}
/**
* @param Form $form
* @param string $message
*/
protected function setFormMessage($form, $message)
{
$form->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
$controller = $this->getToplevelController();
if ($controller->hasMethod('getEditForm')) {
/** @var Form $backForm */
$backForm = $controller->getEditForm();
$backForm->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
}
}
/**
* Return list of class / title to add on the end of record status in breadcrumbs
*
* @return array|null
*/
protected function getRecordStatus()
{
/** @var DataObject|Versioned $record */
$record = $this->record;
// No status if un-versioned
if (!$this->record->hasExtension(Versioned::class)) {
return null;
}
if ($record->isOnDraftOnly()) {
return [
'class' => 'addedtodraft',
'title' => _t(__CLASS__ . '.DRAFT', 'Draft')
];
}
if ($record->isModifiedOnDraft()) {
return [
'class' => 'modified',
'title' => _t(__CLASS__ . '.MODIFIED', 'Modified')
];
}
return null;
}
/**
* Getting buttons that are for versioned objects
*
* @param DataObject|Versioned|RecursivePublishable $record
* @param FieldList $actions
*/
protected function addVersionedButtons(DataObject $record, FieldList $actions)
{
// Get status of the object
$isOnDraft = $record->isOnDraft();
$isPublished = $record->isPublished();
$stagesDiffer = $record->stagesDiffer();
// Check permissions
$canPublish = $record->canPublish();
$canUnpublish = $record->canUnpublish();
$canEdit = $record->canEdit();
$canArchive = $record->canArchive();
// "save", supports an alternate state that is still clickable, but notifies the user that the action is not needed.
$noChangesClasses = 'btn-outline-primary font-icon-tick';
/** @var DataObject|Versioned|RecursivePublishable $liveRecord */
$liveRecord = Versioned::get_by_stage(get_class($record), Versioned::LIVE)->byID($record->ID);
$majorActions = $actions->fieldByName('MajorActions');
// "more options" action
$rootTabSet = TabSet::create('ActionMenus');
$moreOptions = Tab::create(
'MoreOptions',
_t(self::class . '.MoreOptions', 'More options', 'Expands a view for more buttons')
);
$moreOptions->addExtraClass('popover-actions-simulate');
$rootTabSet->push($moreOptions);
$rootTabSet->addExtraClass('ss-ui-action-tabset action-menus noborder');
$infoTemplate = SSViewer::get_templates_by_class(get_class($record), '_Information', DataObject::class);
$moreOptions->push(
LiteralField::create(
'Information',
$record->customise([
'Live' => $liveRecord,
'ExistsOnLive' => $isPublished
])->renderWith($infoTemplate)
)
);
..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/VersionedGridFieldItemRequest.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\View\ArrayData;
use SilverStripe\View\SSViewer;
/**
* Provides versioned dataobject support to {@see GridFieldDetailForm_ItemRequest}
*
* @property GridFieldDetailForm_ItemRequest $owner
*/
class VersionedGridFieldItemRequest extends GridFieldDetailForm_ItemRequest
{
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
$status = $this->getRecordStatus();
$badge = null;
if ($status) {
// Generate badge
$badge = DBField::create_field('HTMLFragment', sprintf(
'<span class="badge version-status version-status--%s">%s</span>',
$status['class'],
$status['title']
));
}
$this->extend('updateBadge', $badge);
if ($badge) {
/** @var ArrayData $lastItem */
$lastItem = $items->last();
$lastItem->setField('Extra', $badge);
}
return $items;
}
/**
* @return FieldList
*/
protected function getFormActions()
{
// Check if record is versionable
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$ownerIsStaged = $record
&& $record->hasExtension(Versioned::class)
&& $record->hasStages();
$ownerRecursivePublishes = !$ownerIsStaged
&& $record
&& $record->hasExtension(RecursivePublishable::class)
&& $record->config()->get('owns');
// Add extra actions prior to extensions so that these can be modified too
if ($ownerIsStaged) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addVersionedButtons($record, $actions);
}
);
} elseif ($ownerRecursivePublishes) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addUnversionedButtons($record, $actions);
}
);
}
return parent::getFormActions();
}
/**
* If a record is recursive publishable, but not versioned, all saves should trigger a recursive publish.
*
* @param array $data
* @param Form $form
* @return DataObject $record
*/
public function saveFormIntoRecord($data, $form)
{
$record = parent::saveFormIntoRecord($data, $form);
// Note: Don't publish if versioned, since that's a separate action
$ownerIsVersioned = $record && $record->hasExtension(Versioned::class);
$ownerIsPublishable = $record && $record->hasExtension(RecursivePublishable::class);
if ($ownerIsPublishable && !$ownerIsVersioned) {
/** @var RecursivePublishable $record */
$record->publishRecursive();
}
return $record;
}
/**
* Archive this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doArchive($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canArchive()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doArchive();
$message = _t(
__CLASS__ . '.Archived',
'Archived {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
//when an item is deleted, redirect to the parent controller
$controller = $this->getToplevelController();
$controller->getRequest()->addHeader('X-Pjax', 'Content'); // Force a content refresh
return $controller->redirect($this->getBackLink(), 302); //redirect back to admin section
}
/**
* Publish this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doPublish($data, $form)
{
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$isNewRecord = $record->ID == 0;
// Check permission
if (!$record->canPublish()) {
return $this->httpError(403);
}
// Initial save and reload
$record = $this->saveFormIntoRecord($data, $form);
$record->publishRecursive();
$editURL = $this->Link('edit');
$xmlTitle = Convert::raw2xml($record->Title);
$link = "<a href=\"{$editURL}\">{$xmlTitle}</a>";
$message = _t(
__CLASS__ . '.Published',
'Published {name} {link}',
[
'name' => $record->i18n_singular_name(),
'link' => $link
]
);
$this->setFormMessage($form, $message);
return $this->redirectAfterSave($isNewRecord);
}
/**
* Delete this record from the live site
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doUnpublish($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canUnpublish()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doUnpublish();
$message = _t(
__CLASS__ . '.Unpublished',
'Unpublished {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
// Redirect back to edit
return $this->redirectAfterSave(false);
}
/**
* @param Form $form
* @param string $message
*/
protected function setFormMessage($form, $message)
{
$form->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
$controller = $this->getToplevelController();
if ($controller->hasMethod('getEditForm')) {
/** @var Form $backForm */
$backForm = $controller->getEditForm();
$backForm->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
}
}
/**
* Return list of class / title to add on the end of record status in breadcrumbs
*
* @return array|null
*/
protected function getRecordStatus()
{
/** @var DataObject|Versioned $record */
$record = $this->record;
// No status if un-versioned
if (!$this->record->hasExtension(Versioned::class)) {
return null;
}
if ($record->isOnDraftOnly()) {
return [
'class' => 'addedtodraft',
'title' => _t(__CLASS__ . '.DRAFT', 'Draft')
];
}
if ($record->isModifiedOnDraft()) {
return [
'class' => 'modified',
'title' => _t(__CLASS__ . '.MODIFIED', 'Modified')
];
}
return null;
}
/**
* Getting buttons that are for versioned objects
*
* @param DataObject|Versioned|RecursivePublishable $record
* @param FieldList $actions
*/
protected function addVersionedButtons(DataObject $record, FieldList $actions)
{
// Get status of the object
$isOnDraft = $record->isOnDraft();
$isPublished = $record->isPublished();
$stagesDiffer = $record->stagesDiffer();
// Check permissions
$canPublish = $record->canPublish();
$canUnpublish = $record->canUnpublish();
$canEdit = $record->canEdit();
$canArchive = $record->canArchive();
// "save", supports an alternate state that is still clickable, but notifies the user that the action is not needed.
$noChangesClasses = 'btn-outline-primary font-icon-tick';
/** @var DataObject|Versioned|RecursivePublishable $liveRecord */
$liveRecord = Versioned::get_by_stage(get_class($record), Versioned::LIVE)->byID($record->ID);
$majorActions = $actions->fieldByName('MajorActions');
// "more options" action
$rootTabSet = TabSet::create('ActionMenus');
$moreOptions = Tab::create(
'MoreOptions',
_t(self::class . '.MoreOptions', 'More options', 'Expands a view for more buttons')
);
$moreOptions->addExtraClass('popover-actions-simulate');
$rootTabSet->push($moreOptions);
$rootTabSet->addExtraClass('ss-ui-action-tabset action-menus noborder');
$infoTemplate = SSViewer::get_templates_by_class(get_class($record), '_Information', DataObject::class);
$moreOptions->push(
LiteralField::create(
'Information',
$record->customise([
'Live' => $liveRecord,
'ExistsOnLive' => $isPublished
])->renderWith($infoTemplate)
)
);
..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/VersionedGridFieldItemRequest.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Unpublish and archive, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\View\ArrayData;
use SilverStripe\View\SSViewer;
/**
* Provides versioned dataobject support to {@see GridFieldDetailForm_ItemRequest}
*
* @property GridFieldDetailForm_ItemRequest $owner
*/
class VersionedGridFieldItemRequest extends GridFieldDetailForm_ItemRequest
{
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
$status = $this->getRecordStatus();
$badge = null;
if ($status) {
// Generate badge
$badge = DBField::create_field('HTMLFragment', sprintf(
'<span class="badge version-status version-status--%s">%s</span>',
$status['class'],
$status['title']
));
}
$this->extend('updateBadge', $badge);
if ($badge) {
/** @var ArrayData $lastItem */
$lastItem = $items->last();
$lastItem->setField('Extra', $badge);
}
return $items;
}
/**
* @return FieldList
*/
protected function getFormActions()
{
// Check if record is versionable
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$ownerIsStaged = $record
&& $record->hasExtension(Versioned::class)
&& $record->hasStages();
$ownerRecursivePublishes = !$ownerIsStaged
&& $record
&& $record->hasExtension(RecursivePublishable::class)
&& $record->config()->get('owns');
// Add extra actions prior to extensions so that these can be modified too
if ($ownerIsStaged) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addVersionedButtons($record, $actions);
}
);
} elseif ($ownerRecursivePublishes) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addUnversionedButtons($record, $actions);
}
);
}
return parent::getFormActions();
}
/**
* If a record is recursive publishable, but not versioned, all saves should trigger a recursive publish.
*
* @param array $data
* @param Form $form
* @return DataObject $record
*/
public function saveFormIntoRecord($data, $form)
{
$record = parent::saveFormIntoRecord($data, $form);
// Note: Don't publish if versioned, since that's a separate action
$ownerIsVersioned = $record && $record->hasExtension(Versioned::class);
$ownerIsPublishable = $record && $record->hasExtension(RecursivePublishable::class);
if ($ownerIsPublishable && !$ownerIsVersioned) {
/** @var RecursivePublishable $record */
$record->publishRecursive();
}
return $record;
}
/**
* Archive this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doArchive($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canArchive()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doArchive();
$message = _t(
__CLASS__ . '.Archived',
'Archived {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
//when an item is deleted, redirect to the parent controller
$controller = $this->getToplevelController();
$controller->getRequest()->addHeader('X-Pjax', 'Content'); // Force a content refresh
return $controller->redirect($this->getBackLink(), 302); //redirect back to admin section
}
/**
* Publish this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doPublish($data, $form)
{
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$isNewRecord = $record->ID == 0;
// Check permission
if (!$record->canPublish()) {
return $this->httpError(403);
}
// Initial save and reload
$record = $this->saveFormIntoRecord($data, $form);
$record->publishRecursive();
$editURL = $this->Link('edit');
$xmlTitle = Convert::raw2xml($record->Title);
$link = "<a href=\"{$editURL}\">{$xmlTitle}</a>";
$message = _t(
__CLASS__ . '.Published',
'Published {name} {link}',
[
'name' => $record->i18n_singular_name(),
'link' => $link
]
);
$this->setFormMessage($form, $message);
return $this->redirectAfterSave($isNewRecord);
}
/**
* Delete this record from the live site
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doUnpublish($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canUnpublish()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doUnpublish();
$message = _t(
__CLASS__ . '.Unpublished',
'Unpublished {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
// Redirect back to edit
return $this->redirectAfterSave(false);
}
/**
* @param Form $form
* @param string $message
*/
protected function setFormMessage($form, $message)
{
$form->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
$controller = $this->getToplevelController();
if ($controller->hasMethod('getEditForm')) {
/** @var Form $backForm */
$backForm = $controller->getEditForm();
$backForm->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
}
}
/**
* Return list of class / title to add on the end of record status in breadcrumbs
*
* @return array|null
*/
protected function getRecordStatus()
{
/** @var DataObject|Versioned $record */
$record = $this->record;
// No status if un-versioned
if (!$this->record->hasExtension(Versioned::class)) {
return null;
}
if ($record->isOnDraftOnly()) {
return [
'class' => 'addedtodraft',
'title' => _t(__CLASS__ . '.DRAFT', 'Draft')
];
}
if ($record->isModifiedOnDraft()) {
return [
'class' => 'modified',
'title' => _t(__CLASS__ . '.MODIFIED', 'Modified')
];
}
return null;
}
/**
* Getting buttons that are for versioned objects
*
* @param DataObject|Versioned|RecursivePublishable $record
* @param FieldList $actions
*/
protected function addVersionedButtons(DataObject $record, FieldList $actions)
{
// Get status of the object
$isOnDraft = $record->isOnDraft();
$isPublished = $record->isPublished();
$stagesDiffer = $record->stagesDiffer();
// Check permissions
$canPublish = $record->canPublish();
$canUnpublish = $record->canUnpublish();
$canEdit = $record->canEdit();
$canArchive = $record->canArchive();
// "save", supports an alternate state that is still clickable, but notifies the user that the action is not needed.
$noChangesClasses = 'btn-outline-primary font-icon-tick';
/** @var DataObject|Versioned|RecursivePublishable $liveRecord */
$liveRecord = Versioned::get_by_stage(get_class($record), Versioned::LIVE)->byID($record->ID);
$majorActions = $actions->fieldByName('MajorActions');
// "more options" action
$rootTabSet = TabSet::create('ActionMenus');
$moreOptions = Tab::create(
'MoreOptions',
_t(self::class . '.MoreOptions', 'More options', 'Expands a view for more buttons')
);
$moreOptions->addExtraClass('popover-actions-simulate');
$rootTabSet->push($moreOptions);
$rootTabSet->addExtraClass('ss-ui-action-tabset action-menus noborder');
$infoTemplate = SSViewer::get_templates_by_class(get_class($record), '_Information', DataObject::class);
$moreOptions->push(
LiteralField::create(
'Information',
$record->customise([
'Live' => $liveRecord,
'ExistsOnLive' => $isPublished
])->renderWith($infoTemplate)
)
);
..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/VersionedGridFieldItemRequest.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\View\ArrayData;
use SilverStripe\View\SSViewer;
/**
* Provides versioned dataobject support to {@see GridFieldDetailForm_ItemRequest}
*
* @property GridFieldDetailForm_ItemRequest $owner
*/
class VersionedGridFieldItemRequest extends GridFieldDetailForm_ItemRequest
{
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
$status = $this->getRecordStatus();
$badge = null;
if ($status) {
// Generate badge
$badge = DBField::create_field('HTMLFragment', sprintf(
'<span class="badge version-status version-status--%s">%s</span>',
$status['class'],
$status['title']
));
}
$this->extend('updateBadge', $badge);
if ($badge) {
/** @var ArrayData $lastItem */
$lastItem = $items->last();
$lastItem->setField('Extra', $badge);
}
return $items;
}
/**
* @return FieldList
*/
protected function getFormActions()
{
// Check if record is versionable
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$ownerIsStaged = $record
&& $record->hasExtension(Versioned::class)
&& $record->hasStages();
$ownerRecursivePublishes = !$ownerIsStaged
&& $record
&& $record->hasExtension(RecursivePublishable::class)
&& $record->config()->get('owns');
// Add extra actions prior to extensions so that these can be modified too
if ($ownerIsStaged) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addVersionedButtons($record, $actions);
}
);
} elseif ($ownerRecursivePublishes) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addUnversionedButtons($record, $actions);
}
);
}
return parent::getFormActions();
}
/**
* If a record is recursive publishable, but not versioned, all saves should trigger a recursive publish.
*
* @param array $data
* @param Form $form
* @return DataObject $record
*/
public function saveFormIntoRecord($data, $form)
{
$record = parent::saveFormIntoRecord($data, $form);
// Note: Don't publish if versioned, since that's a separate action
$ownerIsVersioned = $record && $record->hasExtension(Versioned::class);
$ownerIsPublishable = $record && $record->hasExtension(RecursivePublishable::class);
if ($ownerIsPublishable && !$ownerIsVersioned) {
/** @var RecursivePublishable $record */
$record->publishRecursive();
}
return $record;
}
/**
* Archive this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doArchive($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canArchive()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doArchive();
$message = _t(
__CLASS__ . '.Archived',
'Archived {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
//when an item is deleted, redirect to the parent controller
$controller = $this->getToplevelController();
$controller->getRequest()->addHeader('X-Pjax', 'Content'); // Force a content refresh
return $controller->redirect($this->getBackLink(), 302); //redirect back to admin section
}
/**
* Publish this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doPublish($data, $form)
{
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$isNewRecord = $record->ID == 0;
// Check permission
if (!$record->canPublish()) {
return $this->httpError(403);
}
// Initial save and reload
$record = $this->saveFormIntoRecord($data, $form);
$record->publishRecursive();
$editURL = $this->Link('edit');
$xmlTitle = Convert::raw2xml($record->Title);
$link = "<a href=\"{$editURL}\">{$xmlTitle}</a>";
$message = _t(
__CLASS__ . '.Published',
'Published {name} {link}',
[
'name' => $record->i18n_singular_name(),
'link' => $link
]
);
$this->setFormMessage($form, $message);
return $this->redirectAfterSave($isNewRecord);
}
/**
* Delete this record from the live site
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doUnpublish($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canUnpublish()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doUnpublish();
$message = _t(
__CLASS__ . '.Unpublished',
'Unpublished {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
// Redirect back to edit
return $this->redirectAfterSave(false);
}
/**
* @param Form $form
* @param string $message
*/
protected function setFormMessage($form, $message)
{
$form->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
$controller = $this->getToplevelController();
if ($controller->hasMethod('getEditForm')) {
/** @var Form $backForm */
$backForm = $controller->getEditForm();
$backForm->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
}
}
/**
* Return list of class / title to add on the end of record status in breadcrumbs
*
* @return array|null
*/
protected function getRecordStatus()
{
/** @var DataObject|Versioned $record */
$record = $this->record;
// No status if un-versioned
if (!$this->record->hasExtension(Versioned::class)) {
return null;
}
if ($record->isOnDraftOnly()) {
return [
'class' => 'addedtodraft',
'title' => _t(__CLASS__ . '.DRAFT', 'Draft')
];
}
if ($record->isModifiedOnDraft()) {
return [
'class' => 'modified',
'title' => _t(__CLASS__ . '.MODIFIED', 'Modified')
];
}
return null;
}
/**
* Getting buttons that are for versioned objects
*
* @param DataObject|Versioned|RecursivePublishable $record
* @param FieldList $actions
*/
protected function addVersionedButtons(DataObject $record, FieldList $actions)
{
// Get status of the object
$isOnDraft = $record->isOnDraft();
$isPublished = $record->isPublished();
$stagesDiffer = $record->stagesDiffer();
// Check permissions
$canPublish = $record->canPublish();
$canUnpublish = $record->canUnpublish();
$canEdit = $record->canEdit();
$canArchive = $record->canArchive();
// "save", supports an alternate state that is still clickable, but notifies the user that the action is not needed.
$noChangesClasses = 'btn-outline-primary font-icon-tick';
/** @var DataObject|Versioned|RecursivePublishable $liveRecord */
$liveRecord = Versioned::get_by_stage(get_class($record), Versioned::LIVE)->byID($record->ID);
$majorActions = $actions->fieldByName('MajorActions');
// "more options" action
$rootTabSet = TabSet::create('ActionMenus');
$moreOptions = Tab::create(
'MoreOptions',
_t(self::class . '.MoreOptions', 'More options', 'Expands a view for more buttons')
);
$moreOptions->addExtraClass('popover-actions-simulate');
$rootTabSet->push($moreOptions);
$rootTabSet->addExtraClass('ss-ui-action-tabset action-menus noborder');
$infoTemplate = SSViewer::get_templates_by_class(get_class($record), '_Information', DataObject::class);
$moreOptions->push(
LiteralField::create(
'Information',
$record->customise([
'Live' => $liveRecord,
'ExistsOnLive' => $isPublished
])->renderWith($infoTemplate)
)
);
..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/VersionedGridFieldItemRequest.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Archive, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Versioned;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\View\ArrayData;
use SilverStripe\View\SSViewer;
/**
* Provides versioned dataobject support to {@see GridFieldDetailForm_ItemRequest}
*
* @property GridFieldDetailForm_ItemRequest $owner
*/
class VersionedGridFieldItemRequest extends GridFieldDetailForm_ItemRequest
{
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
$status = $this->getRecordStatus();
$badge = null;
if ($status) {
// Generate badge
$badge = DBField::create_field('HTMLFragment', sprintf(
'<span class="badge version-status version-status--%s">%s</span>',
$status['class'],
$status['title']
));
}
$this->extend('updateBadge', $badge);
if ($badge) {
/** @var ArrayData $lastItem */
$lastItem = $items->last();
$lastItem->setField('Extra', $badge);
}
return $items;
}
/**
* @return FieldList
*/
protected function getFormActions()
{
// Check if record is versionable
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$ownerIsStaged = $record
&& $record->hasExtension(Versioned::class)
&& $record->hasStages();
$ownerRecursivePublishes = !$ownerIsStaged
&& $record
&& $record->hasExtension(RecursivePublishable::class)
&& $record->config()->get('owns');
// Add extra actions prior to extensions so that these can be modified too
if ($ownerIsStaged) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addVersionedButtons($record, $actions);
}
);
} elseif ($ownerRecursivePublishes) {
$this->beforeExtending(
'updateFormActions',
function (FieldList $actions) use ($record, $ownerIsStaged) {
$this->addUnversionedButtons($record, $actions);
}
);
}
return parent::getFormActions();
}
/**
* If a record is recursive publishable, but not versioned, all saves should trigger a recursive publish.
*
* @param array $data
* @param Form $form
* @return DataObject $record
*/
public function saveFormIntoRecord($data, $form)
{
$record = parent::saveFormIntoRecord($data, $form);
// Note: Don't publish if versioned, since that's a separate action
$ownerIsVersioned = $record && $record->hasExtension(Versioned::class);
$ownerIsPublishable = $record && $record->hasExtension(RecursivePublishable::class);
if ($ownerIsPublishable && !$ownerIsVersioned) {
/** @var RecursivePublishable $record */
$record->publishRecursive();
}
return $record;
}
/**
* Archive this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doArchive($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canArchive()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doArchive();
$message = _t(
__CLASS__ . '.Archived',
'Archived {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
//when an item is deleted, redirect to the parent controller
$controller = $this->getToplevelController();
$controller->getRequest()->addHeader('X-Pjax', 'Content'); // Force a content refresh
return $controller->redirect($this->getBackLink(), 302); //redirect back to admin section
}
/**
* Publish this versioned record
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doPublish($data, $form)
{
/** @var Versioned|RecursivePublishable|DataObject $record */
$record = $this->getRecord();
$isNewRecord = $record->ID == 0;
// Check permission
if (!$record->canPublish()) {
return $this->httpError(403);
}
// Initial save and reload
$record = $this->saveFormIntoRecord($data, $form);
$record->publishRecursive();
$editURL = $this->Link('edit');
$xmlTitle = Convert::raw2xml($record->Title);
$link = "<a href=\"{$editURL}\">{$xmlTitle}</a>";
$message = _t(
__CLASS__ . '.Published',
'Published {name} {link}',
[
'name' => $record->i18n_singular_name(),
'link' => $link
]
);
$this->setFormMessage($form, $message);
return $this->redirectAfterSave($isNewRecord);
}
/**
* Delete this record from the live site
*
* @param array $data
* @param Form $form
* @return HTTPResponse
*/
public function doUnpublish($data, $form)
{
/** @var Versioned|DataObject $record */
$record = $this->getRecord();
if (!$record->canUnpublish()) {
return $this->httpError(403);
}
// Record name before it's deleted
$title = $record->Title;
$record->doUnpublish();
$message = _t(
__CLASS__ . '.Unpublished',
'Unpublished {name} {title}',
[
'name' => $record->i18n_singular_name(),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
// Redirect back to edit
return $this->redirectAfterSave(false);
}
/**
* @param Form $form
* @param string $message
*/
protected function setFormMessage($form, $message)
{
$form->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
$controller = $this->getToplevelController();
if ($controller->hasMethod('getEditForm')) {
/** @var Form $backForm */
$backForm = $controller->getEditForm();
$backForm->sessionMessage($message, 'good', ValidationResult::CAST_HTML);
}
}
/**
* Return list of class / title to add on the end of record status in breadcrumbs
*
* @return array|null
*/
protected function getRecordStatus()
{
/** @var DataObject|Versioned $record */
$record = $this->record;
// No status if un-versioned
if (!$this->record->hasExtension(Versioned::class)) {
return null;
}
if ($record->isOnDraftOnly()) {
return [
'class' => 'addedtodraft',
'title' => _t(__CLASS__ . '.DRAFT', 'Draft')
];
}
if ($record->isModifiedOnDraft()) {
return [
'class' => 'modified',
'title' => _t(__CLASS__ . '.MODIFIED', 'Modified')
];
}
return null;
}
/**
* Getting buttons that are for versioned objects
*
* @param DataObject|Versioned|RecursivePublishable $record
* @param FieldList $actions
*/
protected function addVersionedButtons(DataObject $record, FieldList $actions)
{
// Get status of the object
$isOnDraft = $record->isOnDraft();
$isPublished = $record->isPublished();
$stagesDiffer = $record->stagesDiffer();
// Check permissions
$canPublish = $record->canPublish();
$canUnpublish = $record->canUnpublish();
$canEdit = $record->canEdit();
$canArchive = $record->canArchive();
// "save", supports an alternate state that is still clickable, but notifies the user that the action is not needed.
$noChangesClasses = 'btn-outline-primary font-icon-tick';
/** @var DataObject|Versioned|RecursivePublishable $liveRecord */
$liveRecord = Versioned::get_by_stage(get_class($record), Versioned::LIVE)->byID($record->ID);
$majorActions = $actions->fieldByName('MajorActions');
// "more options" action
$rootTabSet = TabSet::create('ActionMenus');
$moreOptions = Tab::create(
'MoreOptions',
_t(self::class . '.MoreOptions', 'More options', 'Expands a view for more buttons')
);
$moreOptions->addExtraClass('popover-actions-simulate');
$rootTabSet->push($moreOptions);
$rootTabSet->addExtraClass('ss-ui-action-tabset action-menus noborder');
$infoTemplate = SSViewer::get_templates_by_class(get_class($record), '_Information', DataObject::class);
$moreOptions->push(
LiteralField::create(
'Information',
$record->customise([
'Live' => $liveRecord,
'ExistsOnLive' => $isPublished
])->renderWith($infoTemplate)
)
);
..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/versioned/src/VersionedGridFieldItemRequest.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\FormAction;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\Security;
class CMSProfileController extends LeftAndMain
{
private static $url_segment = 'myprofile';
private static $menu_title = 'My Profile';
private static $required_permission_codes = false;
private static $tree_class = Member::class;
public function getEditForm($id = null, $fields = null)
{
$this->setCurrentPageID(Security::getCurrentUser()->ID);
$form = parent::getEditForm($id, $fields);
if ($form instanceof HTTPResponse) {
return $form;
}
$form->Fields()->removeByName('LastVisited');
$form->Fields()->push(new HiddenField('ID', null, Security::getCurrentUser()->ID));
$form->Actions()->push(
FormAction::create('save', _t(CMSMain::class . '.SAVE', 'Save'))
->addExtraClass('btn-primary font-icon-save')
->setUseButtonTag(true)
);
$form->Actions()->removeByName('action_delete');
if ($member = Security::getCurrentUser()) {
$form->setValidator($member->getValidator());
} else {
$form->setValidator(Member::singleton()->getValidator());
}
if ($form->Fields()->hasTabSet()) {
$form->Fields()->findOrMakeTab('Root')->setTemplate('SilverStripe\\Forms\\CMSTabSet');
}
$form->addExtraClass('member-profile-form root-form cms-edit-form center fill-height');
return $form;
}
public function canView($member = null)
{
if (!$member && $member !== false) {
$member = Security::getCurrentUser();
}
// cms menus only for logged-in members
if (!$member) {
return false;
}
// Check they can access the CMS and that they are trying to edit themselves
if (Permission::checkMember($member, "CMS_ACCESS")
&& $member->ID === Security::getCurrentUser()->ID
) {
return true;
}
return false;
}
public function save($data, $form)
{
$member = Member::get()->byID($data['ID']);
if (!$member) {
return $this->httpError(404);
}
$origLocale = $member->Locale;
if (!$member->canEdit()) {
$form->sessionMessage(_t(__CLASS__.'.CANTEDIT', 'You don\'t have permission to do that'), 'bad');
return $this->redirectBack();
}
$response = parent::save($data, $form);
if (isset($data['Locale']) && $origLocale != $data['Locale']) {
$response->addHeader('X-Reload', true);
$response->addHeader('X-ControllerURL', $this->Link());
}
return $response;
}
/**
* Only show first element, as the profile form is limited to editing
* the current member it doesn't make much sense to show the member name
* in the breadcrumbs.
*
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
return new ArrayList([$items[0]]);
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/CMSProfileController.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Save, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\FormAction;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\Security;
class CMSProfileController extends LeftAndMain
{
private static $url_segment = 'myprofile';
private static $menu_title = 'My Profile';
private static $required_permission_codes = false;
private static $tree_class = Member::class;
public function getEditForm($id = null, $fields = null)
{
$this->setCurrentPageID(Security::getCurrentUser()->ID);
$form = parent::getEditForm($id, $fields);
if ($form instanceof HTTPResponse) {
return $form;
}
$form->Fields()->removeByName('LastVisited');
$form->Fields()->push(new HiddenField('ID', null, Security::getCurrentUser()->ID));
$form->Actions()->push(
FormAction::create('save', _t(CMSMain::class . '.SAVE', 'Save'))
->addExtraClass('btn-primary font-icon-save')
->setUseButtonTag(true)
);
$form->Actions()->removeByName('action_delete');
if ($member = Security::getCurrentUser()) {
$form->setValidator($member->getValidator());
} else {
$form->setValidator(Member::singleton()->getValidator());
}
if ($form->Fields()->hasTabSet()) {
$form->Fields()->findOrMakeTab('Root')->setTemplate('SilverStripe\\Forms\\CMSTabSet');
}
$form->addExtraClass('member-profile-form root-form cms-edit-form center fill-height');
return $form;
}
public function canView($member = null)
{
if (!$member && $member !== false) {
$member = Security::getCurrentUser();
}
// cms menus only for logged-in members
if (!$member) {
return false;
}
// Check they can access the CMS and that they are trying to edit themselves
if (Permission::checkMember($member, "CMS_ACCESS")
&& $member->ID === Security::getCurrentUser()->ID
) {
return true;
}
return false;
}
public function save($data, $form)
{
$member = Member::get()->byID($data['ID']);
if (!$member) {
return $this->httpError(404);
}
$origLocale = $member->Locale;
if (!$member->canEdit()) {
$form->sessionMessage(_t(__CLASS__.'.CANTEDIT', 'You don\'t have permission to do that'), 'bad');
return $this->redirectBack();
}
$response = parent::save($data, $form);
if (isset($data['Locale']) && $origLocale != $data['Locale']) {
$response->addHeader('X-Reload', true);
$response->addHeader('X-ControllerURL', $this->Link());
}
return $response;
}
/**
* Only show first element, as the profile form is limited to editing
* the current member it doesn't make much sense to show the member name
* in the breadcrumbs.
*
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
return new ArrayList([$items[0]]);
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/CMSProfileController.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\FileField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Security\Group;
use SilverStripe\Security\GroupCsvBulkLoader;
/**
* Imports {@link Group} records by CSV upload, as defined in
* {@link GroupCsvBulkLoader}.
*/
class GroupImportForm extends Form
{
/**
* @var Group Optional group relation
*/
protected $group;
public function __construct($controller, $name, $fields = null, $actions = null, $validator = null)
{
if (!$fields) {
$helpHtml = _t(
__CLASS__ . '.Help1',
'<p>Import one or more groups in <em>CSV</em> format (comma-separated values).'
. ' <small><a href="#" class="toggle-advanced">Show advanced usage</a></small></p>'
);
$importer = new GroupCsvBulkLoader();
$importSpec = $importer->getImportSpec();
$columns = implode(', ', array_keys($importSpec['fields'] ?? []));
$helpHtml .= _t(
__CLASS__ . '.Help2',
'<div class="advanced">'
. '<h4>Advanced usage</h4>'
. '<ul>'
. '<li>Allowed columns: <em>{columns}</em></li>'
. '<li>Existing groups are matched by their unique <em>Code</em> value, and updated with any new values from the '
. 'imported file</li>'
. '<li>Group hierarchies can be created by using a <em>ParentCode</em> column.</li>'
. '<li>Permission codes can be assigned by the <em>PermissionCode</em> column. Existing permission codes are not '
. 'cleared.</li>'
. '</ul>'
. '</div>',
['columns' => $columns]
);
$fields = new FieldList(
new LiteralField('Help', $helpHtml),
$fileField = new FileField(
'CsvFile',
DBField::create_field('HTMLFragment', _t(
MemberImportForm::class . '.FileFieldLabel',
'CSV File <small>(Allowed extensions: *.csv)</small>'
))
)
);
$fileField->getValidator()->setAllowedExtensions(['csv']);
}
if (!$actions) {
$action = new FormAction('doImport', _t(MemberImportForm::class . '.BtnImport', 'Import from CSV'));
$action->addExtraClass('btn btn-outline-secondary font-icon-upload');
$actions = new FieldList($action);
}
if (!$validator) {
$validator = new RequiredFields('CsvFile');
}
parent::__construct($controller, $name, $fields, $actions, $validator);
$this->addExtraClass('cms');
$this->addExtraClass('import-form');
}
public function doImport($data, $form)
{
$loader = new GroupCsvBulkLoader();
// load file
$result = $loader->load($data['CsvFile']['tmp_name']);
// result message
$msgArr = [];
if ($result->CreatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultCreated',
'Created {count} groups',
['count' => $result->CreatedCount()]
);
}
if ($result->UpdatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultUpdated',
'Updated {count} groups',
['count' => $result->UpdatedCount()]
);
}
if ($result->DeletedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultDeleted',
'Deleted {count} groups',
['count' => $result->DeletedCount()]
);
}
$msg = ($msgArr) ? implode(',', $msgArr) : _t(MemberImportForm::class . '.ResultNone', 'No changes');
$this->sessionMessage($msg, 'good');
$this->controller->redirectBack();
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/GroupImportForm.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key CSV File <small>(Allowed extensions: *.csv)</small>, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\FileField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Security\Group;
use SilverStripe\Security\GroupCsvBulkLoader;
/**
* Imports {@link Group} records by CSV upload, as defined in
* {@link GroupCsvBulkLoader}.
*/
class GroupImportForm extends Form
{
/**
* @var Group Optional group relation
*/
protected $group;
public function __construct($controller, $name, $fields = null, $actions = null, $validator = null)
{
if (!$fields) {
$helpHtml = _t(
__CLASS__ . '.Help1',
'<p>Import one or more groups in <em>CSV</em> format (comma-separated values).'
. ' <small><a href="#" class="toggle-advanced">Show advanced usage</a></small></p>'
);
$importer = new GroupCsvBulkLoader();
$importSpec = $importer->getImportSpec();
$columns = implode(', ', array_keys($importSpec['fields'] ?? []));
$helpHtml .= _t(
__CLASS__ . '.Help2',
'<div class="advanced">'
. '<h4>Advanced usage</h4>'
. '<ul>'
. '<li>Allowed columns: <em>{columns}</em></li>'
. '<li>Existing groups are matched by their unique <em>Code</em> value, and updated with any new values from the '
. 'imported file</li>'
. '<li>Group hierarchies can be created by using a <em>ParentCode</em> column.</li>'
. '<li>Permission codes can be assigned by the <em>PermissionCode</em> column. Existing permission codes are not '
. 'cleared.</li>'
. '</ul>'
. '</div>',
['columns' => $columns]
);
$fields = new FieldList(
new LiteralField('Help', $helpHtml),
$fileField = new FileField(
'CsvFile',
DBField::create_field('HTMLFragment', _t(
MemberImportForm::class . '.FileFieldLabel',
'CSV File <small>(Allowed extensions: *.csv)</small>'
))
)
);
$fileField->getValidator()->setAllowedExtensions(['csv']);
}
if (!$actions) {
$action = new FormAction('doImport', _t(MemberImportForm::class . '.BtnImport', 'Import from CSV'));
$action->addExtraClass('btn btn-outline-secondary font-icon-upload');
$actions = new FieldList($action);
}
if (!$validator) {
$validator = new RequiredFields('CsvFile');
}
parent::__construct($controller, $name, $fields, $actions, $validator);
$this->addExtraClass('cms');
$this->addExtraClass('import-form');
}
public function doImport($data, $form)
{
$loader = new GroupCsvBulkLoader();
// load file
$result = $loader->load($data['CsvFile']['tmp_name']);
// result message
$msgArr = [];
if ($result->CreatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultCreated',
'Created {count} groups',
['count' => $result->CreatedCount()]
);
}
if ($result->UpdatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultUpdated',
'Updated {count} groups',
['count' => $result->UpdatedCount()]
);
}
if ($result->DeletedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultDeleted',
'Deleted {count} groups',
['count' => $result->DeletedCount()]
);
}
$msg = ($msgArr) ? implode(',', $msgArr) : _t(MemberImportForm::class . '.ResultNone', 'No changes');
$this->sessionMessage($msg, 'good');
$this->controller->redirectBack();
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/GroupImportForm.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\FileField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Security\Group;
use SilverStripe\Security\GroupCsvBulkLoader;
/**
* Imports {@link Group} records by CSV upload, as defined in
* {@link GroupCsvBulkLoader}.
*/
class GroupImportForm extends Form
{
/**
* @var Group Optional group relation
*/
protected $group;
public function __construct($controller, $name, $fields = null, $actions = null, $validator = null)
{
if (!$fields) {
$helpHtml = _t(
__CLASS__ . '.Help1',
'<p>Import one or more groups in <em>CSV</em> format (comma-separated values).'
. ' <small><a href="#" class="toggle-advanced">Show advanced usage</a></small></p>'
);
$importer = new GroupCsvBulkLoader();
$importSpec = $importer->getImportSpec();
$columns = implode(', ', array_keys($importSpec['fields'] ?? []));
$helpHtml .= _t(
__CLASS__ . '.Help2',
'<div class="advanced">'
. '<h4>Advanced usage</h4>'
. '<ul>'
. '<li>Allowed columns: <em>{columns}</em></li>'
. '<li>Existing groups are matched by their unique <em>Code</em> value, and updated with any new values from the '
. 'imported file</li>'
. '<li>Group hierarchies can be created by using a <em>ParentCode</em> column.</li>'
. '<li>Permission codes can be assigned by the <em>PermissionCode</em> column. Existing permission codes are not '
. 'cleared.</li>'
. '</ul>'
. '</div>',
['columns' => $columns]
);
$fields = new FieldList(
new LiteralField('Help', $helpHtml),
$fileField = new FileField(
'CsvFile',
DBField::create_field('HTMLFragment', _t(
MemberImportForm::class . '.FileFieldLabel',
'CSV File <small>(Allowed extensions: *.csv)</small>'
))
)
);
$fileField->getValidator()->setAllowedExtensions(['csv']);
}
if (!$actions) {
$action = new FormAction('doImport', _t(MemberImportForm::class . '.BtnImport', 'Import from CSV'));
$action->addExtraClass('btn btn-outline-secondary font-icon-upload');
$actions = new FieldList($action);
}
if (!$validator) {
$validator = new RequiredFields('CsvFile');
}
parent::__construct($controller, $name, $fields, $actions, $validator);
$this->addExtraClass('cms');
$this->addExtraClass('import-form');
}
public function doImport($data, $form)
{
$loader = new GroupCsvBulkLoader();
// load file
$result = $loader->load($data['CsvFile']['tmp_name']);
// result message
$msgArr = [];
if ($result->CreatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultCreated',
'Created {count} groups',
['count' => $result->CreatedCount()]
);
}
if ($result->UpdatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultUpdated',
'Updated {count} groups',
['count' => $result->UpdatedCount()]
);
}
if ($result->DeletedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultDeleted',
'Deleted {count} groups',
['count' => $result->DeletedCount()]
);
}
$msg = ($msgArr) ? implode(',', $msgArr) : _t(MemberImportForm::class . '.ResultNone', 'No changes');
$this->sessionMessage($msg, 'good');
$this->controller->redirectBack();
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/GroupImportForm.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Import from CSV, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\FileField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Security\Group;
use SilverStripe\Security\GroupCsvBulkLoader;
/**
* Imports {@link Group} records by CSV upload, as defined in
* {@link GroupCsvBulkLoader}.
*/
class GroupImportForm extends Form
{
/**
* @var Group Optional group relation
*/
protected $group;
public function __construct($controller, $name, $fields = null, $actions = null, $validator = null)
{
if (!$fields) {
$helpHtml = _t(
__CLASS__ . '.Help1',
'<p>Import one or more groups in <em>CSV</em> format (comma-separated values).'
. ' <small><a href="#" class="toggle-advanced">Show advanced usage</a></small></p>'
);
$importer = new GroupCsvBulkLoader();
$importSpec = $importer->getImportSpec();
$columns = implode(', ', array_keys($importSpec['fields'] ?? []));
$helpHtml .= _t(
__CLASS__ . '.Help2',
'<div class="advanced">'
. '<h4>Advanced usage</h4>'
. '<ul>'
. '<li>Allowed columns: <em>{columns}</em></li>'
. '<li>Existing groups are matched by their unique <em>Code</em> value, and updated with any new values from the '
. 'imported file</li>'
. '<li>Group hierarchies can be created by using a <em>ParentCode</em> column.</li>'
. '<li>Permission codes can be assigned by the <em>PermissionCode</em> column. Existing permission codes are not '
. 'cleared.</li>'
. '</ul>'
. '</div>',
['columns' => $columns]
);
$fields = new FieldList(
new LiteralField('Help', $helpHtml),
$fileField = new FileField(
'CsvFile',
DBField::create_field('HTMLFragment', _t(
MemberImportForm::class . '.FileFieldLabel',
'CSV File <small>(Allowed extensions: *.csv)</small>'
))
)
);
$fileField->getValidator()->setAllowedExtensions(['csv']);
}
if (!$actions) {
$action = new FormAction('doImport', _t(MemberImportForm::class . '.BtnImport', 'Import from CSV'));
$action->addExtraClass('btn btn-outline-secondary font-icon-upload');
$actions = new FieldList($action);
}
if (!$validator) {
$validator = new RequiredFields('CsvFile');
}
parent::__construct($controller, $name, $fields, $actions, $validator);
$this->addExtraClass('cms');
$this->addExtraClass('import-form');
}
public function doImport($data, $form)
{
$loader = new GroupCsvBulkLoader();
// load file
$result = $loader->load($data['CsvFile']['tmp_name']);
// result message
$msgArr = [];
if ($result->CreatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultCreated',
'Created {count} groups',
['count' => $result->CreatedCount()]
);
}
if ($result->UpdatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultUpdated',
'Updated {count} groups',
['count' => $result->UpdatedCount()]
);
}
if ($result->DeletedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultDeleted',
'Deleted {count} groups',
['count' => $result->DeletedCount()]
);
}
$msg = ($msgArr) ? implode(',', $msgArr) : _t(MemberImportForm::class . '.ResultNone', 'No changes');
$this->sessionMessage($msg, 'good');
$this->controller->redirectBack();
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/GroupImportForm.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\FileField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Security\Group;
use SilverStripe\Security\GroupCsvBulkLoader;
/**
* Imports {@link Group} records by CSV upload, as defined in
* {@link GroupCsvBulkLoader}.
*/
class GroupImportForm extends Form
{
/**
* @var Group Optional group relation
*/
protected $group;
public function __construct($controller, $name, $fields = null, $actions = null, $validator = null)
{
if (!$fields) {
$helpHtml = _t(
__CLASS__ . '.Help1',
'<p>Import one or more groups in <em>CSV</em> format (comma-separated values).'
. ' <small><a href="#" class="toggle-advanced">Show advanced usage</a></small></p>'
);
$importer = new GroupCsvBulkLoader();
$importSpec = $importer->getImportSpec();
$columns = implode(', ', array_keys($importSpec['fields'] ?? []));
$helpHtml .= _t(
__CLASS__ . '.Help2',
'<div class="advanced">'
. '<h4>Advanced usage</h4>'
. '<ul>'
. '<li>Allowed columns: <em>{columns}</em></li>'
. '<li>Existing groups are matched by their unique <em>Code</em> value, and updated with any new values from the '
. 'imported file</li>'
. '<li>Group hierarchies can be created by using a <em>ParentCode</em> column.</li>'
. '<li>Permission codes can be assigned by the <em>PermissionCode</em> column. Existing permission codes are not '
. 'cleared.</li>'
. '</ul>'
. '</div>',
['columns' => $columns]
);
$fields = new FieldList(
new LiteralField('Help', $helpHtml),
$fileField = new FileField(
'CsvFile',
DBField::create_field('HTMLFragment', _t(
MemberImportForm::class . '.FileFieldLabel',
'CSV File <small>(Allowed extensions: *.csv)</small>'
))
)
);
$fileField->getValidator()->setAllowedExtensions(['csv']);
}
if (!$actions) {
$action = new FormAction('doImport', _t(MemberImportForm::class . '.BtnImport', 'Import from CSV'));
$action->addExtraClass('btn btn-outline-secondary font-icon-upload');
$actions = new FieldList($action);
}
if (!$validator) {
$validator = new RequiredFields('CsvFile');
}
parent::__construct($controller, $name, $fields, $actions, $validator);
$this->addExtraClass('cms');
$this->addExtraClass('import-form');
}
public function doImport($data, $form)
{
$loader = new GroupCsvBulkLoader();
// load file
$result = $loader->load($data['CsvFile']['tmp_name']);
// result message
$msgArr = [];
if ($result->CreatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultCreated',
'Created {count} groups',
['count' => $result->CreatedCount()]
);
}
if ($result->UpdatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultUpdated',
'Updated {count} groups',
['count' => $result->UpdatedCount()]
);
}
if ($result->DeletedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultDeleted',
'Deleted {count} groups',
['count' => $result->DeletedCount()]
);
}
$msg = ($msgArr) ? implode(',', $msgArr) : _t(MemberImportForm::class . '.ResultNone', 'No changes');
$this->sessionMessage($msg, 'good');
$this->controller->redirectBack();
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/GroupImportForm.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key No changes, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\FileField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Security\Group;
use SilverStripe\Security\GroupCsvBulkLoader;
/**
* Imports {@link Group} records by CSV upload, as defined in
* {@link GroupCsvBulkLoader}.
*/
class GroupImportForm extends Form
{
/**
* @var Group Optional group relation
*/
protected $group;
public function __construct($controller, $name, $fields = null, $actions = null, $validator = null)
{
if (!$fields) {
$helpHtml = _t(
__CLASS__ . '.Help1',
'<p>Import one or more groups in <em>CSV</em> format (comma-separated values).'
. ' <small><a href="#" class="toggle-advanced">Show advanced usage</a></small></p>'
);
$importer = new GroupCsvBulkLoader();
$importSpec = $importer->getImportSpec();
$columns = implode(', ', array_keys($importSpec['fields'] ?? []));
$helpHtml .= _t(
__CLASS__ . '.Help2',
'<div class="advanced">'
. '<h4>Advanced usage</h4>'
. '<ul>'
. '<li>Allowed columns: <em>{columns}</em></li>'
. '<li>Existing groups are matched by their unique <em>Code</em> value, and updated with any new values from the '
. 'imported file</li>'
. '<li>Group hierarchies can be created by using a <em>ParentCode</em> column.</li>'
. '<li>Permission codes can be assigned by the <em>PermissionCode</em> column. Existing permission codes are not '
. 'cleared.</li>'
. '</ul>'
. '</div>',
['columns' => $columns]
);
$fields = new FieldList(
new LiteralField('Help', $helpHtml),
$fileField = new FileField(
'CsvFile',
DBField::create_field('HTMLFragment', _t(
MemberImportForm::class . '.FileFieldLabel',
'CSV File <small>(Allowed extensions: *.csv)</small>'
))
)
);
$fileField->getValidator()->setAllowedExtensions(['csv']);
}
if (!$actions) {
$action = new FormAction('doImport', _t(MemberImportForm::class . '.BtnImport', 'Import from CSV'));
$action->addExtraClass('btn btn-outline-secondary font-icon-upload');
$actions = new FieldList($action);
}
if (!$validator) {
$validator = new RequiredFields('CsvFile');
}
parent::__construct($controller, $name, $fields, $actions, $validator);
$this->addExtraClass('cms');
$this->addExtraClass('import-form');
}
public function doImport($data, $form)
{
$loader = new GroupCsvBulkLoader();
// load file
$result = $loader->load($data['CsvFile']['tmp_name']);
// result message
$msgArr = [];
if ($result->CreatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultCreated',
'Created {count} groups',
['count' => $result->CreatedCount()]
);
}
if ($result->UpdatedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultUpdated',
'Updated {count} groups',
['count' => $result->UpdatedCount()]
);
}
if ($result->DeletedCount()) {
$msgArr[] = _t(
__CLASS__ . '.ResultDeleted',
'Deleted {count} groups',
['count' => $result->DeletedCount()]
);
}
$msg = ($msgArr) ? implode(',', $msgArr) : _t(MemberImportForm::class . '.ResultNone', 'No changes');
$this->sessionMessage($msg, 'good');
$this->controller->redirectBack();
}
}
, /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/GroupImportForm.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Save, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Delete, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key CMS Access, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key CMS Access, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use BadMethodCallException;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\SilverStripeNavigator;
use SilverStripe\Control\ContentNegotiator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\PrintableTransformation;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\Security;
use SilverStripe\Security\SecurityToken;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
/**
* LeftAndMain is the parent class of all the two-pane views in the CMS.
* If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
*
* This is essentially an abstract class which should be subclassed.
* See {@link CMSMain} for a good example.
*/
class LeftAndMain extends Controller implements PermissionProvider
{
/**
* Form schema header identifier
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
/**
* Enable front-end debugging (increases verbosity) in dev mode.
* Will be ignored in live environments.
*
* @var bool
*/
private static $client_debugging = true;
/**
* The current url segment attached to the LeftAndMain instance
*
* @config
* @var string
*/
private static $url_segment = null;
/**
* @config
* @var string Used by {@link AdminRootController} to augment Director route rules for sub-classes of LeftAndMain
*/
private static $url_rule = '/$Action/$ID/$OtherID';
/**
* @config
* @var string
*/
private static $menu_title;
/**
* @config
* @var string
*/
private static $menu_icon;
/**
* @config
* @var int
*/
private static $menu_priority = 0;
/**
* @config
* @var int
*/
private static $url_priority = 50;
/**
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @config
* @var string
*/
private static $tree_class = null;
/**
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
*/
private static $help_link = '';
/**
* @var array
*/
private static $allowed_actions = [
'index',
'save',
'printable',
'show',
'Modals',
'EditForm',
'AddForm',
'batchactions',
'BatchActionsForm',
'schema',
'methodSchema',
];
private static $url_handlers = [
'GET schema/$FormName/$ItemID/$OtherItemID' => 'schema',
'GET methodSchema/$Method/$FormName/$ItemID' => 'methodSchema',
];
private static $dependencies = [
'FormSchema' => '%$' . FormSchema::class,
'VersionProvider' => '%$' . VersionProvider::class,
];
/**
* Current form schema helper
*
* @var FormSchema
*/
protected $schema = null;
/**
* Current pageID for this request
*
* @var null
*/
protected $pageID = null;
/**
* Set by {@link LeftAndMainErrorExtension} if an http error occurs
*/
private string $httpErrorMessage;
/**
* Assign themes to use for cms
*
* @config
* @var array
*/
private static $admin_themes = [
'silverstripe/admin:cms-forms',
SSViewer::DEFAULT_THEME,
];
/**
* Codes which are required from the current user to view this controller.
* If multiple codes are provided, all of them are required.
* All CMS controllers require "CMS_ACCESS_LeftAndMain" as a baseline check,
* and fall back to "CMS_ACCESS_<class>" if no permissions are defined here.
* See {@link canView()} for more details on permission checks.
*
* @config
* @var array
*/
private static $required_permission_codes;
/**
* Namespace for session info, e.g. current record.
* Defaults to the current class name, but can be amended to share a namespace in case
* controllers are logically bundled together, and mainly separated
* to achieve more flexible templating.
*
* @config
* @var string
*/
private static $session_namespace;
/**
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* - mysite/javascript/myscript.js
* mysite/javascript/anotherscript.js:
* defer: true
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = [];
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_css = [];
/**
* @config
* @var array See {@link extra_requirements_javascript}
*/
private static $extra_requirements_themedCss = [];
/**
* If true, call a keepalive ping every 5 minutes from the CMS interface,
* to ensure that the session never dies.
*
* @config
* @var bool
*/
private static $session_keepalive_ping = true;
/**
* Value of X-Frame-Options header
*
* @config
* @var string
*/
private static $frame_options = 'SAMEORIGIN';
/**
* The configuration passed to the supporting JS for each CMS section includes a 'name' key
* that by default matches the FQCN of the current class. This setting allows you to change
* the key if necessary (for example, if you are overloading CMSMain or another core class
* and want to keep the core JS - which depends on the core class names - functioning, you
* would need to set this to the FQCN of the class you are overloading).
*
* @config
* @var string|null
*/
private static $section_name = null;
/**
* @var PjaxResponseNegotiator
*/
protected $responseNegotiator;
/**
* @var VersionProvider
*/
protected $versionProvider;
/**
* Gets the combined configuration of all LeftAndMain subclasses required by the client app.
*
* @return string
*
* WARNING: Experimental API
*/
public function getCombinedClientConfig()
{
$combinedClientConfig = ['sections' => []];
$cmsClassNames = CMSMenu::get_cms_classes(LeftAndMain::class, true, CMSMenu::URL_PRIORITY);
// append LeftAndMain to the list as well
$cmsClassNames[] = LeftAndMain::class;
foreach ($cmsClassNames as $className) {
$combinedClientConfig['sections'][] = Injector::inst()->get($className)->getClientConfig();
}
// Pass in base url (absolute and relative)
$combinedClientConfig['baseUrl'] = Director::baseURL();
$combinedClientConfig['absoluteBaseUrl'] = Director::absoluteBaseURL();
$combinedClientConfig['adminUrl'] = AdminRootController::admin_url();
// Get "global" CSRF token for use in JavaScript
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
$combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging');
return json_encode($combinedClientConfig);
}
/**
* Returns configuration required by the client app.
*
* @return array
*
* WARNING: Experimental API
*/
public function getClientConfig()
{
// Allows the section name to be overridden in config
$name = $this->config()->get('section_name');
if (!$name) {
$name = static::class;
}
$clientConfig = [
// Trim leading/trailing slash to make it easier to concatenate URL
// and use in routing definitions.
'name' => $name,
'url' => trim($this->Link() ?? '', '/'),
'..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/LeftAndMain.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\PermissionRole;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
* Security section of the CMS
*/
class SecurityAdmin extends LeftAndMain implements PermissionProvider
{
private static $url_segment = 'security';
private static $url_rule = '/$Action/$ID/$OtherID';
private static $menu_title = 'Security';
private static $tree_class = Group::class;
private static $subitem_class = Member::class;
private static $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
private static $menu_icon_class = 'font-icon-torsos-all';
private static $allowed_actions = [
'EditForm',
'MemberImportForm',
'memberimport',
'GroupImportForm',
'groupimport',
'groups',
'users',
'roles'
];
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function users($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function groups($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function roles($request)
{
return $this->index($request);
}
public function getEditForm($id = null, $fields = null)
{
// Build gridfield configs
$memberListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
$groupListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
/** @var GridFieldDetailForm $detailForm */
$detailForm = $memberListConfig->getComponentByType(GridFieldDetailForm::class);
$memberValidator = Member::singleton()->getValidator();
$detailForm->setValidator($memberValidator);
/** @var GridFieldPageCount $groupPaginator */
$groupListConfig->removeComponentsByType(GridFieldPageCount::class);
$groupListConfig->addComponent(Injector::inst()->createWithArgs(GridFieldPageCount::class, ['buttons-before-right']));
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
if (Permission::check('ADMIN')) {
// @todo when grid field is converted to react use the react component
$memberListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('memberimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTUSERS', 'Import users'))
);
$groupListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('groupimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTGROUPS', 'Import groups'))
);
}
// Build gridfield
$memberList = GridField::create(
'Members',
false,
Member::get(),
$memberListConfig
)->addExtraClass("members_grid");
// Build group fields
$groupList = GridField::create(
'Groups',
false,
Group::get(),
$groupListConfig
);
/** @var GridFieldDataColumns $columns */
$columns = $groupList->getConfig()->getComponentByType(GridFieldDataColumns::class);
$columns->setDisplayFields([
'Breadcrumbs' => Group::singleton()->fieldLabel('Title')
]);
$columns->setFieldFormatting([
'Breadcrumbs' => function ($val, $item) {
/** @var Group $item */
return Convert::raw2xml($item->getBreadcrumbs(' > '));
}
]);
$fields = FieldList::create(
TabSet::create(
'Root',
Tab::create(
'Users',
_t(__CLASS__ . '.Users', 'Users'),
LiteralField::create(
'MembersCautionText',
sprintf(
'<div class="alert alert-warning" role="alert">%s</div>',
_t(
__CLASS__ . '.MemberListCaution',
'Caution: Removing members from this list will remove them from all groups and the database'
)
)
),
$memberList
),
Tab::create(
'Groups',
Group::singleton()->i18n_plural_name(),
$groupList
)
)->setTemplate('SilverStripe\\Forms\\CMSTabSet'),
// necessary for tree node selection in LeftAndMain.EditForm.js
new HiddenField('ID', false, 0)
);
// Add roles editing interface
$rolesTab = null;
if (Permission::check('APPLY_ROLES')) {
$rolesField = GridField::create(
'Roles',
false,
PermissionRole::get(),
GridFieldConfig_RecordEditor::create()
);
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t(__CLASS__ . '.TABROLES', 'Roles'));
$rolesTab->push($rolesField);
}
// Build replacement form
$form = Form::create(
$this,
'EditForm',
$fields,
new FieldList()
)->setHTMLID('Form_EditForm');
$form->addExtraClass('cms-edit-form fill-height');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
$form->addExtraClass('ss-tabset cms-tabset ' . $this->BaseCSSClasses());
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
$this->extend('updateEditForm', $form);
return $form;
}
public function memberimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @return Form
*/
public function MemberImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
/** @var Group $group */
$group = $this->currentPage();
$form = new MemberImportForm($this, __FUNCTION__);
$form->setGroup($group);
return $form;
}
public function groupimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @skipUpgrade
* @return Form
*/
public function GroupImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
return new GroupImportForm($this, __FUNCTION__);
}
/**
* Disable GridFieldDetailForm backlinks for this view, as its
*/
public function Backlink()
{
return false;
}
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
// Name root breadcrumb based on which record is edited,
// which can only be determined by looking for the fieldname of the GridField.
// Note: Titles should be same titles as tabs in RootForm().
$params = $this->getRequest()->allParams();
if (isset($params['FieldName'])) {
// TODO FieldName param gets overwritten by nested GridFields,
// so shows "Members" rather than "Groups" for the following URL:
// admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
$firstCrumb = $crumbs->shift();
if ($params['FieldName'] == 'Groups') {
$crumbs->unshift(new ArrayData([
'Title' => Group::singleton()->i18n_p..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/SecurityAdmin.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Access to '{title}' section, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\PermissionRole;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
* Security section of the CMS
*/
class SecurityAdmin extends LeftAndMain implements PermissionProvider
{
private static $url_segment = 'security';
private static $url_rule = '/$Action/$ID/$OtherID';
private static $menu_title = 'Security';
private static $tree_class = Group::class;
private static $subitem_class = Member::class;
private static $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
private static $menu_icon_class = 'font-icon-torsos-all';
private static $allowed_actions = [
'EditForm',
'MemberImportForm',
'memberimport',
'GroupImportForm',
'groupimport',
'groups',
'users',
'roles'
];
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function users($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function groups($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function roles($request)
{
return $this->index($request);
}
public function getEditForm($id = null, $fields = null)
{
// Build gridfield configs
$memberListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
$groupListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
/** @var GridFieldDetailForm $detailForm */
$detailForm = $memberListConfig->getComponentByType(GridFieldDetailForm::class);
$memberValidator = Member::singleton()->getValidator();
$detailForm->setValidator($memberValidator);
/** @var GridFieldPageCount $groupPaginator */
$groupListConfig->removeComponentsByType(GridFieldPageCount::class);
$groupListConfig->addComponent(Injector::inst()->createWithArgs(GridFieldPageCount::class, ['buttons-before-right']));
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
if (Permission::check('ADMIN')) {
// @todo when grid field is converted to react use the react component
$memberListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('memberimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTUSERS', 'Import users'))
);
$groupListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('groupimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTGROUPS', 'Import groups'))
);
}
// Build gridfield
$memberList = GridField::create(
'Members',
false,
Member::get(),
$memberListConfig
)->addExtraClass("members_grid");
// Build group fields
$groupList = GridField::create(
'Groups',
false,
Group::get(),
$groupListConfig
);
/** @var GridFieldDataColumns $columns */
$columns = $groupList->getConfig()->getComponentByType(GridFieldDataColumns::class);
$columns->setDisplayFields([
'Breadcrumbs' => Group::singleton()->fieldLabel('Title')
]);
$columns->setFieldFormatting([
'Breadcrumbs' => function ($val, $item) {
/** @var Group $item */
return Convert::raw2xml($item->getBreadcrumbs(' > '));
}
]);
$fields = FieldList::create(
TabSet::create(
'Root',
Tab::create(
'Users',
_t(__CLASS__ . '.Users', 'Users'),
LiteralField::create(
'MembersCautionText',
sprintf(
'<div class="alert alert-warning" role="alert">%s</div>',
_t(
__CLASS__ . '.MemberListCaution',
'Caution: Removing members from this list will remove them from all groups and the database'
)
)
),
$memberList
),
Tab::create(
'Groups',
Group::singleton()->i18n_plural_name(),
$groupList
)
)->setTemplate('SilverStripe\\Forms\\CMSTabSet'),
// necessary for tree node selection in LeftAndMain.EditForm.js
new HiddenField('ID', false, 0)
);
// Add roles editing interface
$rolesTab = null;
if (Permission::check('APPLY_ROLES')) {
$rolesField = GridField::create(
'Roles',
false,
PermissionRole::get(),
GridFieldConfig_RecordEditor::create()
);
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t(__CLASS__ . '.TABROLES', 'Roles'));
$rolesTab->push($rolesField);
}
// Build replacement form
$form = Form::create(
$this,
'EditForm',
$fields,
new FieldList()
)->setHTMLID('Form_EditForm');
$form->addExtraClass('cms-edit-form fill-height');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
$form->addExtraClass('ss-tabset cms-tabset ' . $this->BaseCSSClasses());
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
$this->extend('updateEditForm', $form);
return $form;
}
public function memberimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @return Form
*/
public function MemberImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
/** @var Group $group */
$group = $this->currentPage();
$form = new MemberImportForm($this, __FUNCTION__);
$form->setGroup($group);
return $form;
}
public function groupimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @skipUpgrade
* @return Form
*/
public function GroupImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
return new GroupImportForm($this, __FUNCTION__);
}
/**
* Disable GridFieldDetailForm backlinks for this view, as its
*/
public function Backlink()
{
return false;
}
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
// Name root breadcrumb based on which record is edited,
// which can only be determined by looking for the fieldname of the GridField.
// Note: Titles should be same titles as tabs in RootForm().
$params = $this->getRequest()->allParams();
if (isset($params['FieldName'])) {
// TODO FieldName param gets overwritten by nested GridFields,
// so shows "Members" rather than "Groups" for the following URL:
// admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
$firstCrumb = $crumbs->shift();
if ($params['FieldName'] == 'Groups') {
$crumbs->unshift(new ArrayData([
'Title' => Group::singleton()->i18n_p..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/SecurityAdmin.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\PermissionRole;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
* Security section of the CMS
*/
class SecurityAdmin extends LeftAndMain implements PermissionProvider
{
private static $url_segment = 'security';
private static $url_rule = '/$Action/$ID/$OtherID';
private static $menu_title = 'Security';
private static $tree_class = Group::class;
private static $subitem_class = Member::class;
private static $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
private static $menu_icon_class = 'font-icon-torsos-all';
private static $allowed_actions = [
'EditForm',
'MemberImportForm',
'memberimport',
'GroupImportForm',
'groupimport',
'groups',
'users',
'roles'
];
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function users($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function groups($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function roles($request)
{
return $this->index($request);
}
public function getEditForm($id = null, $fields = null)
{
// Build gridfield configs
$memberListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
$groupListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
/** @var GridFieldDetailForm $detailForm */
$detailForm = $memberListConfig->getComponentByType(GridFieldDetailForm::class);
$memberValidator = Member::singleton()->getValidator();
$detailForm->setValidator($memberValidator);
/** @var GridFieldPageCount $groupPaginator */
$groupListConfig->removeComponentsByType(GridFieldPageCount::class);
$groupListConfig->addComponent(Injector::inst()->createWithArgs(GridFieldPageCount::class, ['buttons-before-right']));
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
if (Permission::check('ADMIN')) {
// @todo when grid field is converted to react use the react component
$memberListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('memberimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTUSERS', 'Import users'))
);
$groupListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('groupimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTGROUPS', 'Import groups'))
);
}
// Build gridfield
$memberList = GridField::create(
'Members',
false,
Member::get(),
$memberListConfig
)->addExtraClass("members_grid");
// Build group fields
$groupList = GridField::create(
'Groups',
false,
Group::get(),
$groupListConfig
);
/** @var GridFieldDataColumns $columns */
$columns = $groupList->getConfig()->getComponentByType(GridFieldDataColumns::class);
$columns->setDisplayFields([
'Breadcrumbs' => Group::singleton()->fieldLabel('Title')
]);
$columns->setFieldFormatting([
'Breadcrumbs' => function ($val, $item) {
/** @var Group $item */
return Convert::raw2xml($item->getBreadcrumbs(' > '));
}
]);
$fields = FieldList::create(
TabSet::create(
'Root',
Tab::create(
'Users',
_t(__CLASS__ . '.Users', 'Users'),
LiteralField::create(
'MembersCautionText',
sprintf(
'<div class="alert alert-warning" role="alert">%s</div>',
_t(
__CLASS__ . '.MemberListCaution',
'Caution: Removing members from this list will remove them from all groups and the database'
)
)
),
$memberList
),
Tab::create(
'Groups',
Group::singleton()->i18n_plural_name(),
$groupList
)
)->setTemplate('SilverStripe\\Forms\\CMSTabSet'),
// necessary for tree node selection in LeftAndMain.EditForm.js
new HiddenField('ID', false, 0)
);
// Add roles editing interface
$rolesTab = null;
if (Permission::check('APPLY_ROLES')) {
$rolesField = GridField::create(
'Roles',
false,
PermissionRole::get(),
GridFieldConfig_RecordEditor::create()
);
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t(__CLASS__ . '.TABROLES', 'Roles'));
$rolesTab->push($rolesField);
}
// Build replacement form
$form = Form::create(
$this,
'EditForm',
$fields,
new FieldList()
)->setHTMLID('Form_EditForm');
$form->addExtraClass('cms-edit-form fill-height');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
$form->addExtraClass('ss-tabset cms-tabset ' . $this->BaseCSSClasses());
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
$this->extend('updateEditForm', $form);
return $form;
}
public function memberimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @return Form
*/
public function MemberImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
/** @var Group $group */
$group = $this->currentPage();
$form = new MemberImportForm($this, __FUNCTION__);
$form->setGroup($group);
return $form;
}
public function groupimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @skipUpgrade
* @return Form
*/
public function GroupImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
return new GroupImportForm($this, __FUNCTION__);
}
/**
* Disable GridFieldDetailForm backlinks for this view, as its
*/
public function Backlink()
{
return false;
}
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
// Name root breadcrumb based on which record is edited,
// which can only be determined by looking for the fieldname of the GridField.
// Note: Titles should be same titles as tabs in RootForm().
$params = $this->getRequest()->allParams();
if (isset($params['FieldName'])) {
// TODO FieldName param gets overwritten by nested GridFields,
// so shows "Members" rather than "Groups" for the following URL:
// admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
$firstCrumb = $crumbs->shift();
if ($params['FieldName'] == 'Groups') {
$crumbs->unshift(new ArrayData([
'Title' => Group::singleton()->i18n_p..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/SecurityAdmin.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key CMS Access, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\PermissionRole;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
* Security section of the CMS
*/
class SecurityAdmin extends LeftAndMain implements PermissionProvider
{
private static $url_segment = 'security';
private static $url_rule = '/$Action/$ID/$OtherID';
private static $menu_title = 'Security';
private static $tree_class = Group::class;
private static $subitem_class = Member::class;
private static $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
private static $menu_icon_class = 'font-icon-torsos-all';
private static $allowed_actions = [
'EditForm',
'MemberImportForm',
'memberimport',
'GroupImportForm',
'groupimport',
'groups',
'users',
'roles'
];
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function users($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function groups($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function roles($request)
{
return $this->index($request);
}
public function getEditForm($id = null, $fields = null)
{
// Build gridfield configs
$memberListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
$groupListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
/** @var GridFieldDetailForm $detailForm */
$detailForm = $memberListConfig->getComponentByType(GridFieldDetailForm::class);
$memberValidator = Member::singleton()->getValidator();
$detailForm->setValidator($memberValidator);
/** @var GridFieldPageCount $groupPaginator */
$groupListConfig->removeComponentsByType(GridFieldPageCount::class);
$groupListConfig->addComponent(Injector::inst()->createWithArgs(GridFieldPageCount::class, ['buttons-before-right']));
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
if (Permission::check('ADMIN')) {
// @todo when grid field is converted to react use the react component
$memberListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('memberimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTUSERS', 'Import users'))
);
$groupListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('groupimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTGROUPS', 'Import groups'))
);
}
// Build gridfield
$memberList = GridField::create(
'Members',
false,
Member::get(),
$memberListConfig
)->addExtraClass("members_grid");
// Build group fields
$groupList = GridField::create(
'Groups',
false,
Group::get(),
$groupListConfig
);
/** @var GridFieldDataColumns $columns */
$columns = $groupList->getConfig()->getComponentByType(GridFieldDataColumns::class);
$columns->setDisplayFields([
'Breadcrumbs' => Group::singleton()->fieldLabel('Title')
]);
$columns->setFieldFormatting([
'Breadcrumbs' => function ($val, $item) {
/** @var Group $item */
return Convert::raw2xml($item->getBreadcrumbs(' > '));
}
]);
$fields = FieldList::create(
TabSet::create(
'Root',
Tab::create(
'Users',
_t(__CLASS__ . '.Users', 'Users'),
LiteralField::create(
'MembersCautionText',
sprintf(
'<div class="alert alert-warning" role="alert">%s</div>',
_t(
__CLASS__ . '.MemberListCaution',
'Caution: Removing members from this list will remove them from all groups and the database'
)
)
),
$memberList
),
Tab::create(
'Groups',
Group::singleton()->i18n_plural_name(),
$groupList
)
)->setTemplate('SilverStripe\\Forms\\CMSTabSet'),
// necessary for tree node selection in LeftAndMain.EditForm.js
new HiddenField('ID', false, 0)
);
// Add roles editing interface
$rolesTab = null;
if (Permission::check('APPLY_ROLES')) {
$rolesField = GridField::create(
'Roles',
false,
PermissionRole::get(),
GridFieldConfig_RecordEditor::create()
);
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t(__CLASS__ . '.TABROLES', 'Roles'));
$rolesTab->push($rolesField);
}
// Build replacement form
$form = Form::create(
$this,
'EditForm',
$fields,
new FieldList()
)->setHTMLID('Form_EditForm');
$form->addExtraClass('cms-edit-form fill-height');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
$form->addExtraClass('ss-tabset cms-tabset ' . $this->BaseCSSClasses());
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
$this->extend('updateEditForm', $form);
return $form;
}
public function memberimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @return Form
*/
public function MemberImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
/** @var Group $group */
$group = $this->currentPage();
$form = new MemberImportForm($this, __FUNCTION__);
$form->setGroup($group);
return $form;
}
public function groupimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @skipUpgrade
* @return Form
*/
public function GroupImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
return new GroupImportForm($this, __FUNCTION__);
}
/**
* Disable GridFieldDetailForm backlinks for this view, as its
*/
public function Backlink()
{
return false;
}
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
// Name root breadcrumb based on which record is edited,
// which can only be determined by looking for the fieldname of the GridField.
// Note: Titles should be same titles as tabs in RootForm().
$params = $this->getRequest()->allParams();
if (isset($params['FieldName'])) {
// TODO FieldName param gets overwritten by nested GridFields,
// so shows "Members" rather than "Groups" for the following URL:
// admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
$firstCrumb = $crumbs->shift();
if ($params['FieldName'] == 'Groups') {
$crumbs->unshift(new ArrayData([
'Title' => Group::singleton()->i18n_p..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/SecurityAdmin.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\PermissionRole;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
* Security section of the CMS
*/
class SecurityAdmin extends LeftAndMain implements PermissionProvider
{
private static $url_segment = 'security';
private static $url_rule = '/$Action/$ID/$OtherID';
private static $menu_title = 'Security';
private static $tree_class = Group::class;
private static $subitem_class = Member::class;
private static $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
private static $menu_icon_class = 'font-icon-torsos-all';
private static $allowed_actions = [
'EditForm',
'MemberImportForm',
'memberimport',
'GroupImportForm',
'groupimport',
'groups',
'users',
'roles'
];
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function users($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function groups($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function roles($request)
{
return $this->index($request);
}
public function getEditForm($id = null, $fields = null)
{
// Build gridfield configs
$memberListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
$groupListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
/** @var GridFieldDetailForm $detailForm */
$detailForm = $memberListConfig->getComponentByType(GridFieldDetailForm::class);
$memberValidator = Member::singleton()->getValidator();
$detailForm->setValidator($memberValidator);
/** @var GridFieldPageCount $groupPaginator */
$groupListConfig->removeComponentsByType(GridFieldPageCount::class);
$groupListConfig->addComponent(Injector::inst()->createWithArgs(GridFieldPageCount::class, ['buttons-before-right']));
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
if (Permission::check('ADMIN')) {
// @todo when grid field is converted to react use the react component
$memberListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('memberimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTUSERS', 'Import users'))
);
$groupListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('groupimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTGROUPS', 'Import groups'))
);
}
// Build gridfield
$memberList = GridField::create(
'Members',
false,
Member::get(),
$memberListConfig
)->addExtraClass("members_grid");
// Build group fields
$groupList = GridField::create(
'Groups',
false,
Group::get(),
$groupListConfig
);
/** @var GridFieldDataColumns $columns */
$columns = $groupList->getConfig()->getComponentByType(GridFieldDataColumns::class);
$columns->setDisplayFields([
'Breadcrumbs' => Group::singleton()->fieldLabel('Title')
]);
$columns->setFieldFormatting([
'Breadcrumbs' => function ($val, $item) {
/** @var Group $item */
return Convert::raw2xml($item->getBreadcrumbs(' > '));
}
]);
$fields = FieldList::create(
TabSet::create(
'Root',
Tab::create(
'Users',
_t(__CLASS__ . '.Users', 'Users'),
LiteralField::create(
'MembersCautionText',
sprintf(
'<div class="alert alert-warning" role="alert">%s</div>',
_t(
__CLASS__ . '.MemberListCaution',
'Caution: Removing members from this list will remove them from all groups and the database'
)
)
),
$memberList
),
Tab::create(
'Groups',
Group::singleton()->i18n_plural_name(),
$groupList
)
)->setTemplate('SilverStripe\\Forms\\CMSTabSet'),
// necessary for tree node selection in LeftAndMain.EditForm.js
new HiddenField('ID', false, 0)
);
// Add roles editing interface
$rolesTab = null;
if (Permission::check('APPLY_ROLES')) {
$rolesField = GridField::create(
'Roles',
false,
PermissionRole::get(),
GridFieldConfig_RecordEditor::create()
);
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t(__CLASS__ . '.TABROLES', 'Roles'));
$rolesTab->push($rolesField);
}
// Build replacement form
$form = Form::create(
$this,
'EditForm',
$fields,
new FieldList()
)->setHTMLID('Form_EditForm');
$form->addExtraClass('cms-edit-form fill-height');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
$form->addExtraClass('ss-tabset cms-tabset ' . $this->BaseCSSClasses());
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
$this->extend('updateEditForm', $form);
return $form;
}
public function memberimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @return Form
*/
public function MemberImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
/** @var Group $group */
$group = $this->currentPage();
$form = new MemberImportForm($this, __FUNCTION__);
$form->setGroup($group);
return $form;
}
public function groupimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @skipUpgrade
* @return Form
*/
public function GroupImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
return new GroupImportForm($this, __FUNCTION__);
}
/**
* Disable GridFieldDetailForm backlinks for this view, as its
*/
public function Backlink()
{
return false;
}
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
// Name root breadcrumb based on which record is edited,
// which can only be determined by looking for the fieldname of the GridField.
// Note: Titles should be same titles as tabs in RootForm().
$params = $this->getRequest()->allParams();
if (isset($params['FieldName'])) {
// TODO FieldName param gets overwritten by nested GridFields,
// so shows "Members" rather than "Groups" for the following URL:
// admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
$firstCrumb = $crumbs->shift();
if ($params['FieldName'] == 'Groups') {
$crumbs->unshift(new ArrayData([
'Title' => Group::singleton()->i18n_p..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/SecurityAdmin.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Roles and access permissions, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\PermissionRole;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
* Security section of the CMS
*/
class SecurityAdmin extends LeftAndMain implements PermissionProvider
{
private static $url_segment = 'security';
private static $url_rule = '/$Action/$ID/$OtherID';
private static $menu_title = 'Security';
private static $tree_class = Group::class;
private static $subitem_class = Member::class;
private static $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
private static $menu_icon_class = 'font-icon-torsos-all';
private static $allowed_actions = [
'EditForm',
'MemberImportForm',
'memberimport',
'GroupImportForm',
'groupimport',
'groups',
'users',
'roles'
];
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function users($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function groups($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function roles($request)
{
return $this->index($request);
}
public function getEditForm($id = null, $fields = null)
{
// Build gridfield configs
$memberListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
$groupListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
/** @var GridFieldDetailForm $detailForm */
$detailForm = $memberListConfig->getComponentByType(GridFieldDetailForm::class);
$memberValidator = Member::singleton()->getValidator();
$detailForm->setValidator($memberValidator);
/** @var GridFieldPageCount $groupPaginator */
$groupListConfig->removeComponentsByType(GridFieldPageCount::class);
$groupListConfig->addComponent(Injector::inst()->createWithArgs(GridFieldPageCount::class, ['buttons-before-right']));
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
if (Permission::check('ADMIN')) {
// @todo when grid field is converted to react use the react component
$memberListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('memberimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTUSERS', 'Import users'))
);
$groupListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('groupimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTGROUPS', 'Import groups'))
);
}
// Build gridfield
$memberList = GridField::create(
'Members',
false,
Member::get(),
$memberListConfig
)->addExtraClass("members_grid");
// Build group fields
$groupList = GridField::create(
'Groups',
false,
Group::get(),
$groupListConfig
);
/** @var GridFieldDataColumns $columns */
$columns = $groupList->getConfig()->getComponentByType(GridFieldDataColumns::class);
$columns->setDisplayFields([
'Breadcrumbs' => Group::singleton()->fieldLabel('Title')
]);
$columns->setFieldFormatting([
'Breadcrumbs' => function ($val, $item) {
/** @var Group $item */
return Convert::raw2xml($item->getBreadcrumbs(' > '));
}
]);
$fields = FieldList::create(
TabSet::create(
'Root',
Tab::create(
'Users',
_t(__CLASS__ . '.Users', 'Users'),
LiteralField::create(
'MembersCautionText',
sprintf(
'<div class="alert alert-warning" role="alert">%s</div>',
_t(
__CLASS__ . '.MemberListCaution',
'Caution: Removing members from this list will remove them from all groups and the database'
)
)
),
$memberList
),
Tab::create(
'Groups',
Group::singleton()->i18n_plural_name(),
$groupList
)
)->setTemplate('SilverStripe\\Forms\\CMSTabSet'),
// necessary for tree node selection in LeftAndMain.EditForm.js
new HiddenField('ID', false, 0)
);
// Add roles editing interface
$rolesTab = null;
if (Permission::check('APPLY_ROLES')) {
$rolesField = GridField::create(
'Roles',
false,
PermissionRole::get(),
GridFieldConfig_RecordEditor::create()
);
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t(__CLASS__ . '.TABROLES', 'Roles'));
$rolesTab->push($rolesField);
}
// Build replacement form
$form = Form::create(
$this,
'EditForm',
$fields,
new FieldList()
)->setHTMLID('Form_EditForm');
$form->addExtraClass('cms-edit-form fill-height');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
$form->addExtraClass('ss-tabset cms-tabset ' . $this->BaseCSSClasses());
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
$this->extend('updateEditForm', $form);
return $form;
}
public function memberimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @return Form
*/
public function MemberImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
/** @var Group $group */
$group = $this->currentPage();
$form = new MemberImportForm($this, __FUNCTION__);
$form->setGroup($group);
return $form;
}
public function groupimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @skipUpgrade
* @return Form
*/
public function GroupImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
return new GroupImportForm($this, __FUNCTION__);
}
/**
* Disable GridFieldDetailForm backlinks for this view, as its
*/
public function Backlink()
{
return false;
}
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
// Name root breadcrumb based on which record is edited,
// which can only be determined by looking for the fieldname of the GridField.
// Note: Titles should be same titles as tabs in RootForm().
$params = $this->getRequest()->allParams();
if (isset($params['FieldName'])) {
// TODO FieldName param gets overwritten by nested GridFields,
// so shows "Members" rather than "Groups" for the following URL:
// admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
$firstCrumb = $crumbs->shift();
if ($params['FieldName'] == 'Groups') {
$crumbs->unshift(new ArrayData([
'Title' => Group::singleton()->i18n_p..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/SecurityAdmin.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 669 // Evaluate __CLASS__ . '.KEY' and self::class concatenation
670 $text = implode('\\', $currentClass);
671 } else {
672 continue;
673 }
674
675 if ($inConcat) {
676 // Parser error
677 if (empty($currentEntity)) {
678 user_error('Error concatenating localisation key', E_USER_WARNING);
679 } else {
680 $currentEntity[count($currentEntity) - 1] .= $text;
681 }
682 } else {
683 $currentEntity[] = $text;
684 }
Trace Error concatenating localisation key
i18nTextCollector.php:678
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\PermissionRole;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
* Security section of the CMS
*/
class SecurityAdmin extends LeftAndMain implements PermissionProvider
{
private static $url_segment = 'security';
private static $url_rule = '/$Action/$ID/$OtherID';
private static $menu_title = 'Security';
private static $tree_class = Group::class;
private static $subitem_class = Member::class;
private static $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
private static $menu_icon_class = 'font-icon-torsos-all';
private static $allowed_actions = [
'EditForm',
'MemberImportForm',
'memberimport',
'GroupImportForm',
'groupimport',
'groups',
'users',
'roles'
];
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function users($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function groups($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function roles($request)
{
return $this->index($request);
}
public function getEditForm($id = null, $fields = null)
{
// Build gridfield configs
$memberListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
$groupListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
/** @var GridFieldDetailForm $detailForm */
$detailForm = $memberListConfig->getComponentByType(GridFieldDetailForm::class);
$memberValidator = Member::singleton()->getValidator();
$detailForm->setValidator($memberValidator);
/** @var GridFieldPageCount $groupPaginator */
$groupListConfig->removeComponentsByType(GridFieldPageCount::class);
$groupListConfig->addComponent(Injector::inst()->createWithArgs(GridFieldPageCount::class, ['buttons-before-right']));
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
if (Permission::check('ADMIN')) {
// @todo when grid field is converted to react use the react component
$memberListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('memberimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTUSERS', 'Import users'))
);
$groupListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('groupimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTGROUPS', 'Import groups'))
);
}
// Build gridfield
$memberList = GridField::create(
'Members',
false,
Member::get(),
$memberListConfig
)->addExtraClass("members_grid");
// Build group fields
$groupList = GridField::create(
'Groups',
false,
Group::get(),
$groupListConfig
);
/** @var GridFieldDataColumns $columns */
$columns = $groupList->getConfig()->getComponentByType(GridFieldDataColumns::class);
$columns->setDisplayFields([
'Breadcrumbs' => Group::singleton()->fieldLabel('Title')
]);
$columns->setFieldFormatting([
'Breadcrumbs' => function ($val, $item) {
/** @var Group $item */
return Convert::raw2xml($item->getBreadcrumbs(' > '));
}
]);
$fields = FieldList::create(
TabSet::create(
'Root',
Tab::create(
'Users',
_t(__CLASS__ . '.Users', 'Users'),
LiteralField::create(
'MembersCautionText',
sprintf(
'<div class="alert alert-warning" role="alert">%s</div>',
_t(
__CLASS__ . '.MemberListCaution',
'Caution: Removing members from this list will remove them from all groups and the database'
)
)
),
$memberList
),
Tab::create(
'Groups',
Group::singleton()->i18n_plural_name(),
$groupList
)
)->setTemplate('SilverStripe\\Forms\\CMSTabSet'),
// necessary for tree node selection in LeftAndMain.EditForm.js
new HiddenField('ID', false, 0)
);
// Add roles editing interface
$rolesTab = null;
if (Permission::check('APPLY_ROLES')) {
$rolesField = GridField::create(
'Roles',
false,
PermissionRole::get(),
GridFieldConfig_RecordEditor::create()
);
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t(__CLASS__ . '.TABROLES', 'Roles'));
$rolesTab->push($rolesField);
}
// Build replacement form
$form = Form::create(
$this,
'EditForm',
$fields,
new FieldList()
)->setHTMLID('Form_EditForm');
$form->addExtraClass('cms-edit-form fill-height');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
$form->addExtraClass('ss-tabset cms-tabset ' . $this->BaseCSSClasses());
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
$this->extend('updateEditForm', $form);
return $form;
}
public function memberimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @return Form
*/
public function MemberImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
/** @var Group $group */
$group = $this->currentPage();
$form = new MemberImportForm($this, __FUNCTION__);
$form->setGroup($group);
return $form;
}
public function groupimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @skipUpgrade
* @return Form
*/
public function GroupImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
return new GroupImportForm($this, __FUNCTION__);
}
/**
* Disable GridFieldDetailForm backlinks for this view, as its
*/
public function Backlink()
{
return false;
}
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
// Name root breadcrumb based on which record is edited,
// which can only be determined by looking for the fieldname of the GridField.
// Note: Titles should be same titles as tabs in RootForm().
$params = $this->getRequest()->allParams();
if (isset($params['FieldName'])) {
// TODO FieldName param gets overwritten by nested GridFields,
// so shows "Members" rather than "Groups" for the following URL:
// admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
$firstCrumb = $crumbs->shift();
if ($params['FieldName'] == 'Groups') {
$crumbs->unshift(new ArrayData([
'Title' => Group::singleton()->i18n_p..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/SecurityAdmin.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
GET /dev/tasks/i18nTextCollectorTask Source 738 $entity = ['default' => $default];
739 } else {
740 $entity = $default;
741 }
742 if ($comment) {
743 $entity['comment'] = $comment;
744 }
745 $entities[$key] = $entity;
746 } elseif ($this->getWarnOnEmptyDefault()) {
747 trigger_error("Missing localisation default for key " . $currentEntity[0], E_USER_NOTICE);
748 }
749 }
750 $currentEntity = [];
751 $inArrayClosedBy = false;
752 break;
753 }
Trace trigger_error(Missing localisation default for key Roles and access permissions, 1024)
i18nTextCollector.php:747
SilverStripe\i18n\TextCollection\i18nTextCollector->collectFromCode(<?php
namespace SilverStripe\Admin;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Security\PermissionRole;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
* Security section of the CMS
*/
class SecurityAdmin extends LeftAndMain implements PermissionProvider
{
private static $url_segment = 'security';
private static $url_rule = '/$Action/$ID/$OtherID';
private static $menu_title = 'Security';
private static $tree_class = Group::class;
private static $subitem_class = Member::class;
private static $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
private static $menu_icon_class = 'font-icon-torsos-all';
private static $allowed_actions = [
'EditForm',
'MemberImportForm',
'memberimport',
'GroupImportForm',
'groupimport',
'groups',
'users',
'roles'
];
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function users($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function groups($request)
{
return $this->index($request);
}
/**
* Shortcut action for setting the correct active tab.
*
* @param HTTPRequest $request
* @return HTTPResponse
*/
public function roles($request)
{
return $this->index($request);
}
public function getEditForm($id = null, $fields = null)
{
// Build gridfield configs
$memberListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
$groupListConfig = GridFieldConfig_RecordEditor::create()
->addComponent(Injector::inst()->createWithArgs(GridFieldExportButton::class, ['buttons-before-left']));
/** @var GridFieldDetailForm $detailForm */
$detailForm = $memberListConfig->getComponentByType(GridFieldDetailForm::class);
$memberValidator = Member::singleton()->getValidator();
$detailForm->setValidator($memberValidator);
/** @var GridFieldPageCount $groupPaginator */
$groupListConfig->removeComponentsByType(GridFieldPageCount::class);
$groupListConfig->addComponent(Injector::inst()->createWithArgs(GridFieldPageCount::class, ['buttons-before-right']));
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
if (Permission::check('ADMIN')) {
// @todo when grid field is converted to react use the react component
$memberListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('memberimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTUSERS', 'Import users'))
);
$groupListConfig->addComponent(
GridFieldImportButton::create('buttons-before-left')
->setImportIframe($this->Link('groupimport'))
->setModalTitle(_t(__CLASS__ . '.IMPORTGROUPS', 'Import groups'))
);
}
// Build gridfield
$memberList = GridField::create(
'Members',
false,
Member::get(),
$memberListConfig
)->addExtraClass("members_grid");
// Build group fields
$groupList = GridField::create(
'Groups',
false,
Group::get(),
$groupListConfig
);
/** @var GridFieldDataColumns $columns */
$columns = $groupList->getConfig()->getComponentByType(GridFieldDataColumns::class);
$columns->setDisplayFields([
'Breadcrumbs' => Group::singleton()->fieldLabel('Title')
]);
$columns->setFieldFormatting([
'Breadcrumbs' => function ($val, $item) {
/** @var Group $item */
return Convert::raw2xml($item->getBreadcrumbs(' > '));
}
]);
$fields = FieldList::create(
TabSet::create(
'Root',
Tab::create(
'Users',
_t(__CLASS__ . '.Users', 'Users'),
LiteralField::create(
'MembersCautionText',
sprintf(
'<div class="alert alert-warning" role="alert">%s</div>',
_t(
__CLASS__ . '.MemberListCaution',
'Caution: Removing members from this list will remove them from all groups and the database'
)
)
),
$memberList
),
Tab::create(
'Groups',
Group::singleton()->i18n_plural_name(),
$groupList
)
)->setTemplate('SilverStripe\\Forms\\CMSTabSet'),
// necessary for tree node selection in LeftAndMain.EditForm.js
new HiddenField('ID', false, 0)
);
// Add roles editing interface
$rolesTab = null;
if (Permission::check('APPLY_ROLES')) {
$rolesField = GridField::create(
'Roles',
false,
PermissionRole::get(),
GridFieldConfig_RecordEditor::create()
);
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t(__CLASS__ . '.TABROLES', 'Roles'));
$rolesTab->push($rolesField);
}
// Build replacement form
$form = Form::create(
$this,
'EditForm',
$fields,
new FieldList()
)->setHTMLID('Form_EditForm');
$form->addExtraClass('cms-edit-form fill-height');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
$form->addExtraClass('ss-tabset cms-tabset ' . $this->BaseCSSClasses());
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
$this->extend('updateEditForm', $form);
return $form;
}
public function memberimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Form' => $this->MemberImportForm()->forTemplate(),
'Content' => ' '
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @return Form
*/
public function MemberImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
/** @var Group $group */
$group = $this->currentPage();
$form = new MemberImportForm($this, __FUNCTION__);
$form->setGroup($group);
return $form;
}
public function groupimport()
{
Requirements::clear();
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::javascript('silverstripe/admin: client/dist/js/MemberImportForm.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
return $this->renderWith('BlankPage', [
'Content' => ' ',
'Form' => $this->GroupImportForm()->forTemplate()
]);
}
/**
* @see SecurityAdmin_MemberImportForm
*
* @skipUpgrade
* @return Form
*/
public function GroupImportForm()
{
if (!Permission::check('ADMIN')) {
return null;
}
return new GroupImportForm($this, __FUNCTION__);
}
/**
* Disable GridFieldDetailForm backlinks for this view, as its
*/
public function Backlink()
{
return false;
}
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
// Name root breadcrumb based on which record is edited,
// which can only be determined by looking for the fieldname of the GridField.
// Note: Titles should be same titles as tabs in RootForm().
$params = $this->getRequest()->allParams();
if (isset($params['FieldName'])) {
// TODO FieldName param gets overwritten by nested GridFields,
// so shows "Members" rather than "Groups" for the following URL:
// admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
$firstCrumb = $crumbs->shift();
if ($params['FieldName'] == 'Groups') {
$crumbs->unshift(new ArrayData([
'Title' => Group::singleton()->i18n_p..., /home/xunaan6/scubafrisco.com/vendor/silverstripe/admin/code/SecurityAdmin.php, SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:485
SilverStripe\i18n\TextCollection\i18nTextCollector->processModule(SilverStripe\Core\Manifest\Module)
i18nTextCollector.php:402
SilverStripe\i18n\TextCollection\i18nTextCollector->getEntitiesByModule()
i18nTextCollector.php:200
SilverStripe\i18n\TextCollection\i18nTextCollector->collect(, 1)
i18nTextCollector.php:172
SilverStripe\i18n\TextCollection\i18nTextCollector->run(, 1)
i18nTextCollectorTask.php:61
SilverStripe\Dev\Tasks\i18nTextCollectorTask->run(SilverStripe\Control\HTTPRequest)
TaskRunner.php:127
SilverStripe\Dev\TaskRunner->runTask(SilverStripe\Control\HTTPRequest)
RequestHandler.php:323
SilverStripe\Control\RequestHandler->handleAction(SilverStripe\Control\HTTPRequest, runTask)
Controller.php:286
SilverStripe\Control\Controller->handleAction(SilverStripe\Control\HTTPRequest, runTask)
RequestHandler.php:202
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
RequestHandler.php:226
SilverStripe\Control\RequestHandler->handleRequest(SilverStripe\Control\HTTPRequest)
Controller.php:212
SilverStripe\Control\Controller->handleRequest(SilverStripe\Control\HTTPRequest)
Director.php:360
SilverStripe\Control\Director->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
SEORequestProcessor.php:81
SilverStripers\SEO\Control\SEORequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
VersionedHTTPMiddleware.php:41
SilverStripe\Versioned\VersionedHTTPMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
LoginSessionMiddleware.php:29
SilverStripe\SessionManager\Middleware\LoginSessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ExecMetricMiddleware.php:20
SilverStripe\Control\Middleware\ExecMetricMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ConfirmationMiddleware.php:254
SilverStripe\Control\Middleware\ConfirmationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
PasswordExpirationMiddleware.php:84
SilverStripe\Security\PasswordExpirationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
BasicAuthMiddleware.php:68
SilverStripe\Security\BasicAuthMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AuthenticationMiddleware.php:61
SilverStripe\Security\AuthenticationMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
CanonicalURLMiddleware.php:190
SilverStripe\Control\Middleware\CanonicalURLMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPCacheControlMiddleware.php:42
SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
ChangeDetectionMiddleware.php:28
SilverStripe\Control\Middleware\ChangeDetectionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
FlushMiddleware.php:27
SilverStripe\Control\Middleware\FlushMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
RequestProcessor.php:67
SilverStripe\Control\RequestProcessor->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
SessionMiddleware.php:20
SilverStripe\Control\Middleware\SessionMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
AllowedHostsMiddleware.php:60
SilverStripe\Control\Middleware\AllowedHostsMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
TrustedProxyMiddleware.php:176
SilverStripe\Control\Middleware\TrustedProxyMiddleware->process(SilverStripe\Control\HTTPRequest, Closure)
HTTPMiddlewareAware.php:62
SilverStripe\Control\Director->SilverStripe\Control\Middleware\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\Director->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
Director.php:369
SilverStripe\Control\Director->handleRequest(SilverStripe\Control\HTTPRequest)
HTTPApplication.php:117
SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure, SilverStripe\Control\HTTPRequest)
HTTPApplication.php:136
SilverStripe\Control\HTTPApplication->SilverStripe\Control\{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest, Closure)
HTTPApplication.php:137
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest, Closure, )
HTTPApplication.php:116
SilverStripe\Control\HTTPApplication->handle(SilverStripe\Control\HTTPRequest)
index.php:25
SilverStripe\Dev\Tasks\i18nTextCollectorTask completed!