Child pages
  • [cms] "_Auto: " page is created for every page
Skip to end of metadata
Go to start of metadata

By default for every template (*.tpl file) in theme a corresponding section (category) is created. This is done to:

  • allow presence of content blocks (pieces of HTML, that can be edited via WYSIWYG editor) on that template
  • allow setting custom properties of that template (e.g. cache lifetime, secure http connection requirement, etc.)

If during development time decision is made, that a particular template don't need that, then filename must be added to ".smsignore" file, that is located in same directory, where template file is created.

However I've found a behavior, that In-Portal still creates a page (ignoring .smsignore file), when user visits it in any of editing modes (browse/content/design). This code in question in "categories_event_handler.php" file:

File "categories_event_handler.php"
if ($page_id === false && EDITING_MODE) {
	// create missing pages, when in editing mode
	$object = $this->Application->recallObject($this->Prefix . '.rebuild', null, Array('skip_autoload' => true));
	/* @var $object CategoriesItem */
	$created = $this->_prepareAutoPage($object, $template, null, SMS_MODE_AUTO); // create virtual (not system!) page
	if ($created) {
		if ($this->Application->ConfigValue('QuickCategoryPermissionRebuild') || !$this->Application->isAdmin) {
			$updater = $this->Application->makeClass('kPermCacheUpdater');
			/* @var $updater kPermCacheUpdater */
		$page_id = $object->GetID();
		$this->Application->SetVar('m_cat_id', $page_id);

Removing code, mentioned above solved mentioned problem, but created another one. Tag <inp2:st_EditingScripts/> produced SQL error, because it always assumes, that section (category) must exist prior to calling this tag.

As a solution we should not show any editing control (e.g. content revision toolbar) on a template if it doesn't have corresponding section (category).

Related Tasks

INP-1230 - Getting issue details... STATUS

1 Comment

  1. Thank you for describing the issue.

    Let's create a task for this discussion and schedule it for In-Portal 5.2.1