User tests: Successful: Unsuccessful:
Pull Request for Issue #21533 .
Read the archived functionallity in the frontend
Create an archived link and the archived module
Check and compare the functionality with J! 3
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content Language & Strings Modules |
Title |
|
Labels |
Added:
?
?
|
Title |
|
changed Title to show its about 4.0.
I have tested this item
After PR applied got Undefined class constant 'CONDITION_ARCHIVED'
Title |
|
@franz-wohlkoenig - where did you get this error? I am testing right now and cannot reproduce this Messsage.
http://wohlkoenig-4.joomla.com/index.php/en/ (Patch is now installed)
@franz-wohlkoenig could you please activate the debug mode to see the exact position of the error?
@bembelimen Debug Mode is activated now.
Could you please check if your file looks the same: https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/Extension/ContentComponent.php
<?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Content\Administrator\Extension;
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Association\AssociationServiceTrait;
use Joomla\CMS\Association\AssociationServiceInterface;
use Joomla\CMS\Categories\CategoriesServiceInterface;
use Joomla\CMS\Categories\CategoriesServiceTrait;
use Joomla\CMS\Extension\BootableExtensionInterface;
use Joomla\CMS\Extension\MVCComponent;
use Joomla\CMS\Fields\FieldsServiceInterface;
use Joomla\CMS\Form\Form;
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
use Joomla\CMS\MVC\Factory\MVCFactoryServiceTrait;
use Joomla\CMS\MVC\Factory\MVCFactoryServiceInterface;
use Joomla\CMS\Workflow\WorkflowServiceInterface;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
use Joomla\Component\Content\Administrator\Service\HTML\AdministratorService;
use Joomla\Component\Content\Administrator\Service\HTML\Icon;
use Psr\Container\ContainerInterface;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
/**
* Component class for com_content
*
* @since __DEPLOY_VERSION__
*/
class ContentComponent extends MVCComponent implements
BootableExtensionInterface, MVCFactoryServiceInterface, CategoriesServiceInterface, FieldsServiceInterface,
AssociationServiceInterface, WorkflowServiceInterface
{
use CategoriesServiceTrait;
use AssociationServiceTrait;
use HTMLRegistryAwareTrait;
/**
* Booting the extension. This is the function to set up the environment of the extension like
* registering new class loaders, etc.
*
* If required, some initial set up can be done from services of the container, eg.
* registering HTML services.
*
* @param ContainerInterface $container The container
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function boot(ContainerInterface $container)
{
$this->getRegistry()->register('contentadministrator', new AdministratorService);
$this->getRegistry()->register('contenticon', new Icon($container->get(SiteApplication::class)));
// The layout joomla.content.icons does need a general icon service
$this->getRegistry()->register('icon', $this->getRegistry()->getService('contenticon'));
}
/**
* Returns a valid section for the given section. If it is not valid then null
* is returned.
*
* @param string $section The section to get the mapping for
* @param object $item The item
*
* @return string|null The new section
*
* @since __DEPLOY_VERSION__
*/
public function validateSection($section, $item = null)
{
if (Factory::getApplication()->isClient('site'))
{
// On the front end we need to map some sections
switch ($section)
{
// Editing an article
case 'form':
// Category list view
case 'featured':
case 'category':
$section = 'article';
}
}
if ($section != 'article')
{
// We don't know other sections
return null;
}
return $section;
}
/**
* Returns valid contexts
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function getContexts(): array
{
Factory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR);
$contexts = array(
'com_content.article' => Text::_('COM_CONTENT'),
'com_content.categories' => Text::_('JCATEGORY')
);
return $contexts;
}
/**
* Returns the table for the count items functions for the given section.
*
* @param string $section The section
*
* @return string|null
*
* @since __DEPLOY_VERSION__
*/
protected function getTableNameForSection(string $section = null)
{
return '#__content';
}
/**
* Method to filter transitions by given id of state.
*
* @param array $transitions The Transitions to filter
* @param int $pk Id of the state
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function filterTransitions($transitions, $pk): array
{
return ContentHelper::filterTransitions($transitions, $pk);
}
/**
* Adds Count Items for Category Manager.
*
* @param \stdClass[] $items The category objects
* @param string $section The section
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function countItems(array $items, string $section)
{
return ContentHelper::countItems($items);
}
/**
* Adds Count Items for Tags Manager.
*
* @param \stdClass[] $items The tag objects
* @param string $section The section
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function countTagItems(array $items, string $section)
{
return ContentHelper::countTagItems($items, $section);
}
/**
* Prepares the category form
*
* @param Form $form The form to prepare
* @param array|object $data The form data
*
* @return void
*/
public function prepareForm(Form $form, $data)
{
ContentHelper::onPrepareForm($form, $data);
}
/**
* Method to change state of multiple ids
*
* @param array $pks Array of IDs
* @param int $condition Condition of the workflow state
*
* @return boolean
*
* @since __DEPLOY_VERSION__
*/
public static function updateContentState($pks, $condition): bool
{
return ContentHelper::updateContentState($pks, $condition);
}
}
Looks like you have an outdated version?
ah, so its same as joomla/joomla-websites#1207
Sorry for wasting Time.
I have tested this item
As far as I can tell all is good with this and the default workflow
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-08-20 18:36:03 |
Closed_By | ⇒ | wilsonge |
Thanks guys!
@bembelimen
While correcting ContentHelperRoute::getCategoryRoute()
to always use the $language
variable in #21916 , I do not use catslug
anymore.
Has this any unwanted effect on this pr here $query->select($this->getSlugColumn($query, 'c.id', 'c.alias') . ' AS catslug');
I mean should it be modified to use AS catid
?
changed Title to show its about 4.0.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21701.