Giter Club home page Giter Club logo

Comments (5)

alikon avatar alikon commented on July 24, 2024 1

i was able to reproduce on 2nd run
": "Save failed with the following error: Joomla\\Component\\Menus\\Administrator\\Table\\MenuTable::_getNode(1, id) failed.",

and the #__menu table is messed up for lft, rgt

from joomla-cms.

muhme avatar muhme commented on July 24, 2024
  • @alikon gave the correct hint there are problems with __menu table πŸ‘
  • the check of the table __menu shows that there is no entry with id 1 and therefore the used parent_id 1 fails, hardwired the parent_id was changed to (at this moment) existing id 2 the test run was successful several times
  • a stable solution would therefore be to initial search for a (e.g. the first) menu item and then use this menu item ID as parent_id

from joomla-cms.

muhme avatar muhme commented on July 24, 2024

But the more important question is, why is the so importand looking __menu entry id=1 title=Menu_Item_Root alias=root deleted in a fresh instance with running only sytem tests? The obvious suspect is the test case can delete a site menu item in the same file. And with this question, the approach of getting the first menu entry and using its id sound more like a work around and does not fix the main cause that menu entry #1 being deleted.

from joomla-cms.

alikon avatar alikon commented on July 24, 2024

please test #43456

from joomla-cms.

muhme avatar muhme commented on July 24, 2024

on fresh macOS-docker-4.4-dev installation

  • tested before the PR:
    • every run of SiteMenuItems.cy.js deletes one more entry from the __menu table, starting with id=1
    • from the 2nd run, the test case can create a site menu item fails because there is no longer a parent menu entry id=1
    • restored entry with:
INSERT INTO `jos44_menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`, `publish_up`, `publish_down`) VALUES
(1, '', 'Menu_Item_Root', 'root', '', '', '', '', 1, 0, 0, 0, NULL, NULL, 0, 0, '', 0, '', 0, 43, 0, '*', 0, NULL, NULL);
  • applied gh pr checkout 43456
    • checked tests/System/integration/api/com_menus/SiteMenuItems.cy.js has changed to beforeEach
    • multiple runs of SiteMenuItems.cy.js
      • no test failures anymore βœ…
      • no __menu entries are deleted βœ…
    • overall test run with 110 specs and 435 test cases passed βœ…

Thank you for fixing πŸ˜„

from joomla-cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.