• Resolved jblakely

    (@jblakely)


    I’m just curious about something I noticed while poking around.

    Under the Manage Plugin option on the Manage Repository tab everything listed has a nice checkmark next to it except for these two trigger items under Data Menus (I still don’t know how to include an image in a forum post).

    Data Menus
    (checked) Table wp_wpda_menu_items found
    (X’ed out) Trigger wp_wpda_menu_items_before_insert not found
    (X’ed out) Trigger wp_wpda_menu_items_before_update not found

    (checked) 0 menu items in repository

    This is not causing me any problems that I know of, but I just like to understand things.

    How are these triggers intended to be used and is there anything I need to do to install or enable them?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Good question John!

    With my database programming background I like to put as much logic as possible in the database. Old school database programming! I like consistency! ?? Data Menus was one of the first plugin features I wrote. I added some triggers to the Data Menus table to keep the data consistent. I had no experience with WordPress programming when I started writing the plugin. In the meanwhile I have learned that developing a WordPress plugin means that you develop code that runs on a large number of completely different servers. There are some minimal requirements, but you need to keep your code as basic as possible. And I have learned that most WordPress installations do not allow to create database triggers. I no longer add them to new plugin tables. Someday the Data Menus triggers might be gone as well I guess… ??

    To get back to your question, the triggers check the consistency of the table data. If a WordPess installation does not allow to create triggers, the consistency is only checked in the data entry form. That’s basically fine, but a user would still be able to add inconsistent data through the MySQL console or PHPMyAdmin for example. With a database trigger that would not be possible. So with database triggers your data would always be consistent.

    Does this answer your question?

    Best regards,
    Peter

    Thread Starter jblakely

    (@jblakely)

    Hi Peter,

    Makes perfect sense.

    Your background is not so dissimilar from mine and I too am a big fan of consistency.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘What are Trigger messages under Data Repository?’ is closed to new replies.