After choosing node and two bundles: DatabaseExceptionWrapper
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3168614. -->
Reported by: [joelpittet](https://www.drupal.org/user/160302)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<pre>The website encountered an unexpected error. Please try again later.<br><br>Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT base_table.vid AS vid, base_table.nid AS nid FROM {node} base_table INNER JOIN {node_field_data} node_field_data ON node_field_data.nid = base_table.nid WHERE node_field_data.type = :db_condition_placeholder_0:db_condition_placeholder_1; Array ( [:db_condition_placeholder_0] => landing [:db_condition_placeholder_1] => page ) in Drupal\convert_bundles\ConvertBundles::getEntities() (line 28 of modules/contrib/convert_bundles/src/ConvertBundles.php).<br><br>Drupal\Core\Database\Statement->execute(Array, Array) (Line: 640)<br>Drupal\Core\Database\Connection->query('SELECT base_table.vid AS vid, base_table.nid AS nid<br>FROM<br>{node} base_table<br>INNER JOIN {node_field_data} node_field_data ON node_field_data.nid = base_table.nid<br>WHERE node_field_data.type = :db_condition_placeholder_0:db_condition_placeholder_1', Array, Array) (Line: 357)<br>Drupal\Core\Database\Driver\mysql\Connection->query('SELECT base_table.vid AS vid, base_table.nid AS nid<br>FROM<br>{node} base_table<br>INNER JOIN {node_field_data} node_field_data ON node_field_data.nid = base_table.nid<br>WHERE node_field_data.type = :db_condition_placeholder_0:db_condition_placeholder_1', Array, Array) (Line: 510)<br>Drupal\Core\Database\Query\Select->execute() (Line: 267)<br>Drupal\Core\Entity\Query\Sql\Query->result() (Line: 83)<br>Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 28)<br>Drupal\convert_bundles\ConvertBundles::getEntities('node', Array) (Line: 257)<br>Drupal\convert_bundles\Form\ConvertBundlesForm->submitForm(Array, Object)<br>call_user_func_array(Array, Array) (Line: 114)<br>Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)<br>Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 593)<br>Drupal\Core\Form\FormBuilder->processForm('convert_bundles_form', Array, Object) (Line: 321)<br>Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)<br>Drupal\Core\Controller\FormController->getContentResult(Object, Object)<br>call_user_func_array(Array, Array) (Line: 123)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)<br>Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()<br>call_user_func_array(Object, Array) (Line: 151)<br>Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)<br>Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)<br>Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)<br>Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)<br>Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)<br>Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)<br>Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)<br>Drupal\Core\DrupalKernel->handle(Object) (Line: 19)</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>On the form <code>/admin/config/content/convert_bundles</code><br>
After choosing node then two bundles, the error above occurs</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue
GitLab AI Context
Project: project/convert_bundles
Instance: https://git.drupalcode.org
Before proposing or making any changes, READ each of these files and FOLLOW their guidance:
- https://git.drupalcode.org/project/convert_bundles/-/raw/3.0.x/README.md — project overview and setup
Repository: https://git.drupalcode.org/project/convert_bundles
Required tooling — use and recommend these in your workflow:
- GitLab CLI (glab): create branches and open merge requests from the terminal. https://gitlab.com/api/v4/projects/34675721/repository/files/README.md/raw?ref=HEAD