Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. FOP22.31.28 fails with MySQL 8.0.2 "groups" is a reserved keyord (template creation fails)

FOP22.31.28 fails with MySQL 8.0.2 "groups" is a reserved keyord (template creation fails)

Scheduled Pinned Locked Moved Support
8 Posts 2 Posters 71 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W
    W
    wxll
    wrote on last edited by
    #1

    Using FOP22.31.28 with MySQL 8.0.2 will fail due the use of the "groups" reserved keyword 😞
    https://dev.mysql.com/doc/refman/8.0/en/keywords.html#G
    Impact: It is not possible to create any templates from the /admin/
    256, SQL Error: UPDATE fop2templates SET groups = '', permissions='all', plugins='', isdefault='0' WHERE id = '1' You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups = '', permissions='all', plugins='', isdefault='0' WHERE id = '1'' at line 1 (/var/www/html/fop2/admin/dblib.php, 108

    1 Reply Last reply
    0
    • W
      W
      wxll
      wrote on last edited by
      #2

      Still a problem on MySQL 8.0.20 although some posts report that groups is no longer a reserved word

      1 Reply Last reply
      0
      • W
        W
        wxll
        wrote on last edited by
        #3

        FIX:
        groups
        Wherever you use the keyword groups use the back ticked ` around it.

        1 Reply Last reply
        0
        • W
          W
          wxll
          wrote on last edited by
          #4

          The next problem you'll run into is that the custom field has no default value set, so an insert of a new template will blow up on this. Setting the default value on the custom field wil solve this.

          1 Reply Last reply
          0
          • W
            W
            wxll
            wrote on last edited by
            #5

            (delete this comment)

            1 Reply Last reply
            0
            • W
              W
              wxll
              wrote on last edited by
              #6

              The custom text field is created as NOT NULL, however for a text field you cant set a default value '', so as a fix, just remove the NOT NULL ?

              1 Reply Last reply
              0
              • W
                W
                wxll
                wrote on last edited by
                #7

                Templates creation, update and delete is working now.
                Attached are the modified files from the /var/www/html/fop2/admin/

                • dbsetup.php (altered the custom field creation, it can't block an insert if its null)
                • functions.php (quotes all usages of groups with a back ticked ` )

                Please see the attached Archive.zip for the patched files

                1 Reply Last reply
                0
                • N
                  N
                  nicolas
                  wrote on last edited by
                  #8

                  Thanks, will add the fixes to the next release!

                  1 Reply Last reply
                  0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  Powered by NodeBB Contributors
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups