Incompatibility with Commerce 3.3.x and possibly with other modules
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3574207. --> Reported by: [interdruper](https://www.drupal.org/user/2437374) Related to !89 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Commerce 3 uses the option 'icon' in some of its links to render some commerce-related icons. Other modules could do the same. Function </p> <pre>ui_icons_menu__preprocess_menu_item()</pre><p> in iu_icons_menu.module tries to sanitize this, but it is not enough in the case of Commerce 3.3.x: the icon option in some urls does not use the 'target_id' key, and the function triggers a PHP fatal error. </p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Install Commerce 3.3.x. Open the admin menu, where Commerce builds links with icons.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add an additional check to ui_icons_menu__preprocess_menu_item():</p> <pre>&nbsp; if (empty($icon['target_id'])) {<br>&nbsp;&nbsp;&nbsp; return;<br>&nbsp; }</pre><h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Prepare the patch.</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>None</p> <h3 id="summary-api-changes">API changes</h3> <p>None</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>None.</p>
issue