Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Stacktrace of error If installation fails, and you refresh the page to /admin/modules.
For example, a refresh after this error:
Fatal error: Call to undefined function url() in /home/ubuntu/workspace/modules/xmlsitemap/xmlsitemap.install on line 298
( ! ) Fatal error: Cannot use object of type Drupal\Core\Form\FormState as array in C:\...\drupal8\modules\contrib\xmlsitemap\xmlsitemap.module on line 1568 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0021 | 148016 | {main}( ) | ..\index.php:0 |
2 | 0.0683 | 1267744 | Drupal\Core\DrupalKernel->handle( ) | ..\index.php:22 |
3 | 0.5087 | 9439272 | Stack\StackedHttpKernel->handle( ) | ..\DrupalKernel.php:563 |
4 | 0.5088 | 9439376 | Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle( ) | ..\StackedHttpKernel.php:23 |
5 | 0.5088 | 9439416 | Drupal\Core\StackMiddleware\PageCache->handle( ) | ..\ReverseProxyMiddleware.php:58 |
6 | 0.5794 | 9476736 | Drupal\Core\StackMiddleware\KernelPreHandle->handle( ) | ..\PageCache.php:52 |
7 | 0.5885 | 9519224 | Symfony\Component\HttpKernel\HttpKernel->handle( ) | ..\KernelPreHandle.php:53 |
8 | 0.5885 | 9519472 | Symfony\Component\HttpKernel\HttpKernel->handleRaw( ) | ..\HttpKernel.php:66 |
9 | 25.9968 | 32290272 | call_user_func_array ( ) |
..\HttpKernel.php:145 |
10 | 25.9968 | 32290528 | Drupal\Core\Controller\HtmlPageController->content( ) | ..\HttpKernel.php:145 |
11 | 25.9968 | 32290576 | Drupal\Core\Controller\HtmlPageController->getContentResult( ) | ..\HtmlPageController.php:53 |
12 | 25.9975 | 32290776 | call_user_func_array ( ) |
..\HtmlPageController.php:76 |
13 | 25.9975 | 32291096 | Drupal\Core\Controller\FormController->getContentResult( ) | ..\HtmlPageController.php:76 |
14 | 26.0070 | 32523480 | Drupal\Core\Form\FormBuilder->buildForm( ) | ..\FormController.php:81 |
15 | 37.5056 | 34725312 | Drupal\Core\Form\FormBuilder->prepareForm( ) | ..\FormBuilder.php:212 |
16 | 38.3140 | 36016264 | Drupal\Core\Extension\ModuleHandler->alter( ) | ..\FormBuilder.php:634 |
17 | 38.3162 | 36019424 | xmlsitemap_form_alter( ) | ..\ModuleHandler.php:497 |
18 | 38.3162 | 36019440 | xmlsitemap_form_controller( ) | ..\xmlsitemap.module:1575 |
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff-3-4.txt | 1.89 KB | tadityar |
#4 | 2396675-form_state_as_array-4.patch | 14.55 KB | tadityar |
#3 | 2396675-3-form_state_as_array.patch | 14.11 KB | stella |
#2 | 2396675-2-form_state_as_array.patch | 14.11 KB | stella |
#1 | 2396675-1-form_state_as_array.patch | 1.47 KB | stella |
Comments
Comment #1
stella CreditAttribution: stella commentedHere's a patch that fixes this error.
Comment #2
stella CreditAttribution: stella commentedFound more instances of $form_state being treated as an array. Updated patch attached.
Comment #3
stella CreditAttribution: stella commentedFixed typo.
Comment #4
tadityar CreditAttribution: tadityar commentedFixed more $form_state that was treated as an array.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedLooks good!
Comment #7
tadityar CreditAttribution: tadityar commentedCommitted and pushed to 8.x-1.x-dev. Thanks!