Hi -
I think this is a pretty nifty little plugin and had until today used it without any problems. However, I've encountered a problem very similar to this one:
viewtopic.php?f=10&t=167
For security reasons I have created a wordpress installation in a distinct directory (i.e. http://www.myurl.com/directory/wordpress installation). After installing the latest version of the plugin (1.01.0) on WP 2.7.1 I found I could not create a new quiz and instead got a 'Not found' error. I solved this by re-writing part of the quiz_action.php to reflect the new directory structure e.g. wp_redirect($wpframe_home . '/directory/wp-admin/edit.php?page=quizzin/quiz.php&message=updated');
Now, I do not get a 'Not found' error. Instead, I get a message that tells me I have created quiz but it has no number attached (e.g. [QUIZZIN ] . When I return to manage quizzes, the quiz has gone. Also - no quiz related tables have been created within the SQL database.
I had previously tested the quiz plugin on the same server but with the installation one directory above the current position (i.e. http://www.myurl.com/wordpress installation.;) and had no problems.
Is this problem related to the new directory path? Where should I look to re-write the relevant chunks of code?
Thanks for the plugin & thanks for any help you can offer.
Iain
Quiz Creation Bug - Directory Paths Causing Problem?
(4 posts) (2 voices)-
Posted 2 years ago #
-
Hi -
Me again. I haven't solved the problem, but I did notice that your plugin assumes that the database prefix will be wp_. This may not be the case if a Wordpress user (like me!) has renamed the table prefix as a security measure.
I have re-written all references to wp_ prefix tables and tried re-installing. Still no tables are being created in my database.
Most curious.
Do I also need to re-write the following in accordance with my new directory structure?
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
Thanks once again for any help.
IainPosted 2 years ago # -
Actually, the plugin don't expect the wp_ prefix - if you find any specific instance of that happening, let me know.
I'm still a bit confused about your problem. I think the plugin's tables got deleted someway - I'm not sure - but that's what I think.Posted 2 years ago # -
Thanks so much for replying.
Your theory is correct. Here's how I solved the problem:
1. I imported new tables into the database via MyPHPAdmin after exporting them from an earlier installation. It was my fault - I had deleted the plugin tables by accident.
2. After this, I was still experiencing the problem of having all questions + next button + show results button on the same page. This was indeed because, as you suggested in a separate thread, the style sheet wasn't being included. So, I needed to write some explicit paths in the show_quiz.php file. e.g.:
<link type="text/css" rel="stylesheet" href="/installationdirectory/wp-content/plugins/quizzin/style.css" />
<script type="text/javascript" src="/installationdirectory/wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript" src="/installationdirectory/wp-content/plugins/quizzin/script.js"></script>
Everything working beautifully again!
Really appreciate you taking time to read about my problem & hope this info can help another in need.
IainPosted 2 years ago #
Reply
You must log in to post.