Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14728

Install SQL schema expects style_id to be '1'

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 3.1.9
    • None
    • Installation system
    • None
    • PHP 5.6.24, MariaDB Galera 10.0.26

    Description

      Hello,

      We're using a MariaDB Galera cluster which decide automatically what the next auto_increment id will be.

      The current installer always expects the default_style id to be 1 while it relies on the systems auto_increment id on insert:

      phpBB3/install/schemas/schema_data.sql

      96: INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style', '1');
      473: INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Limited', 1, 'prosilver', 'kNg=', 0, '');
      

      Better (easy) is to assign 1 to the record like this:

      INSERT INTO phpbb_styles (style_id, style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES (1, 'prosilver', '© phpBB Limited', 1, 'prosilver', 'kNg=', 0, '');
      

      Or change the code that it will add the default style dynamically. I don't know if the default install relies on other fixed IDs (which is bad practice of course).

      Let me know if you need any more information.

      Regards,
      Daan

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              DJVG DJVG [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: