When editing the Basic Page content type (/admin/structure/types/manage/page
), we are getting the following error message.
Error message:
Notice: Undefined index: changefreq in Drupal\simple_sitemap\Form\FormHelper->displayEntitySettings() (line 337 of modules\contrib\simple_sitemap\src\Form\FormHelper.php).
Drupal\simple_sitemap\Form\FormHelper->displayEntitySettings(Array) (Line: 56)
simple_sitemap_form_alter(Array, Object, 'node_type_edit_form') (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'node_type_edit_form') (Line: 835)
Drupal\Core\Form\FormBuilder->prepareForm('node_type_edit_form', Array, Object) (Line: 277)
Drupal\Core\Form\FormBuilder->buildForm('node_type_edit_form', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
/admin/structure/types/manage/page
)Simple Sitemap
tabIndex entities of type Basic page in variant Default
to true, Priority = 0.5
, Changefreq = - not specified -
// Changefreq
$form_fragment['settings'][$variant]['changefreq_' . $variant . '_' . $this->getEntityTypeId() . '_settings'] = [
'#type' => 'select',
'#title' => $this->t('Change frequency'),
'#description' => $this->getEntityCategory() === 'instance'
? $this->t('The frequency with which this <em>@bundle</em> entity changes. Search engine bots may take this as an indication of how often to index it.', ['@bundle' => $bundle_name])
: $this->t('The frequency with which entities of this type change. Search engine bots may take this as an indication of how often to index them.'),
'#default_value' => $this->settings[$variant]['changefreq'],
'#options' => $this->getChangefreqSelectValues(),
'#states' => [
'visible' => [':input[name="index_' . $variant . '_' . $this->getEntityTypeId() . '_settings"]' => ['value' => 1]],
],
];
Add validation so that if the changefreq
is set to - Not specified -
, there is a value available for that.
Fixed
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.