Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11038

Does not correctly find module info classes using new naming conventions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0-b1
    • 3.1.0-dev
    • None
    • None

      I am adding a new module with two modes for my post revisions feature, and my main module file is located at includes/acp/acp_revisions.php and the class name is "acp_revisions" (the new guidelines would expect it to be phpbb_acp_revisions but that would not play nicely with the module system, afaik).

      According to lines 565-568 of includes/acp/acp_modules.php:

      				// If the class does not exist it might be following the old
      				// format. phpbb_acp_info_acp_foo needs to be turned into
      				// acp_foo_info and the respective file has to be included
      				// manually because it does not support auto loading

      So my info class would be located in includes/acp/info/acp_revisions.php and the class would be "phpbb_acp_info_acp_revisions". However, if I make that my class name, the module is not added during installation, and if I go to add it manually, it gives me the confirmation screen, but when I click Yes, it just returns to the module listing with no success or error (and the module is not added).

      Renaming the class to acp_revisions_info, as is the "old" way, works as expected. The bug is that the "new" naming guidelines do not work with the modules system. This either needs to be documented or fixed.

            nickvergessen Joas Schilling
            imkingdavid David King [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: