• Resolved potjekak

    (@potjekak)


    Hi, if I create new bonus questions, the questions aren’t showing in de bonus questions section. When I create a new one and finish it, it’s calculating, but not showing in the questions list.

    During World Cup 2018 it worked perfectly, and now it’s not (never used it anymore since then :-))

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author AntoineH

    (@antoineh)

    The questions are not shown in the admin when you add a new one? Really strange, I have not seen that before.

    One thing that comes to mind is caching. I use the WordPress caching mechanism to store the question info in memory, but in the admin I always clear the cache when an update is done (newly added, updated or deleted question). Do you have a separate cache plugin enabled? If so, can you try to disable that one to see if it resolves the issue?

    Thread Starter potjekak

    (@potjekak)

    Hi Antoine, unfortunately there are no caching plugins, and also the option within JetPack is disabled. I tried it in Google Chrome and in Microsoft Edge, but none of these browsers show the bonus questions. It says “question saved” (in Dutch), but nothing to see.

    Thread Starter potjekak

    (@potjekak)

    When I do a debug in WordPress, it says something about the Question Order…

    WordPress databasefout: [Unknown column 'question_order' in 'order clause']
    SELECT id, match_id FROM pool_wp_bonusquestions WHERE match_id > 0 ORDER BY match_id ASC, question_order ASC, answer_before_date ASC
    WordPress databasefout: [Unknown column 'question_order' in 'field list']
    INSERT INTO pool_wp_bonusquestions ( question, points, answer_before_date, answer, match_id, question_order ) VALUES ( 'Welk land wordt Europees kampioen?', 20, '2021-06-10 22:00', '', 0, 1 )
    WordPress databasefout: [Unknown column 'q.question_order' in 'field list']
    SELECT q.id, q.question, q.answer, q.points, q.answer_before_date AS question_date, DATE_FORMAT( q.score_date, '%Y-%m-%d %H:%i' ) AS score_date, DATE_FORMAT( q.answer_before_date, '%Y-%m-%d %H:%i' ) AS answer_before_date, q.match_id, qt.type, qt.options, qt.image, qt.max_answers, q.question_order FROM pool_wp_bonusquestions q INNER JOIN pool_wp_bonusquestions_type qt ON ( q.id = qt.question_id ) ORDER BY q.answer_before_date ASC, q.question_order ASC
    • This reply was modified 3 years, 10 months ago by potjekak.
    Plugin Author AntoineH

    (@antoineh)

    Ah, that explains a lot ?? Thanks for this info.

    In version 2.9.0 I introduced a new field in the questions table. Looks like the update script did not run correctly. You can fix this by running the following query in your database (if you have the default db prefix):

    ALTER TABLE pool_wp_bonusquestions
     ADD question_order SMALLINT UNSIGNED NOT NULL DEFAULT '1' AFTER match_id, 
     ADD INDEX ix_question_order (question_order);

    Do you know what upgrade path you took with the plugin? Maybe I can try to do the same and reproduce the error.

    • This reply was modified 3 years, 10 months ago by AntoineH. Reason: fixed formatting of query
    Thread Starter potjekak

    (@potjekak)

    Yeah, the query works. Now I see the questions I used back in 2018. They’re back ??
    New questions do also appear when I create them! Everythin works fine!
    Thanks!

    The upgrade path is the same as the paths you used. I always update them immediately.
    I just didn’t use it anymore since Euro 2018.

    Hello, i have the same problem but i don’t know how to run the following query in my database… Can you help me please.

    I love your plugin! Very good job! thanks a lot man!

    It’s good ! with some research i have found how to do ! Thanks a lot for you’re plugin !

    Plugin Author AntoineH

    (@antoineh)

    Most hosting companies offer a tool like phpmyadmin to execute a query on your database. You can check your panel or ask them. There are also plugins that allow you to execute a query.

    Just make sure you check your table prefix and, if needed, adjust the query to match your table name.

    Plugin Author AntoineH

    (@antoineh)

    It’s good ! with some research i have found how to do ! Thanks a lot for you’re plugin !

    Great! Hope it solves the problem for you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Bonus Questions not visible in back-end’ is closed to new replies.