mmmmdave
Forum Replies Created
-
I asked my friend to look into this issue. He fixed it! Here is what he told me. (This is all greek to me, but hopefully it helps you guys.)
======================
I started logging queries and could see that they were being called, but no rows were being added to the table. First query I saw was:INSERT INTO
wp_redirection_items(url,action_type,regex,position,match_type,action_data,action_code,last_access,group_id) VALUES (‘/about-us.html’,’url’,”,’23’,’url’,’/products.html’,’301′,’0′,’3′)But it errored with “Incorrect integer value: ” for column ‘regex’ at row 1″
Obviously, the code should not be passing an empty string (”) as the value for an integer column, so I modified a line in wp-content\plugins\redirection\models\redirect.php as follows:
Original: ‘regex’ => $regex
New: ‘regex’ => ($regex ? 1 : 0)Tried to add the redirect again, and saw this query:
INSERT INTO
wp_redirection_items(url,action_type,regex,position,match_type,action_data,action_code,last_access,group_id) VALUES (‘/products.html’,’url’,’0′,’0′,’url’,’/test.html’,’301′,’0′,’1′)So now I’m passing ‘0’ instead of ” for regex, but it errored again with “Incorrect datetime value: ‘0’ for column ‘last_access’ at row 1”
So I modified a line in wp-content\plugins\redirection\models\redirect.php as follows:
Original: ‘last_access’ => 0
New: ‘last_access’ => ‘0000-00-00 00:00:00’Then it worked. The changes I made to redirect.php are two “hacks” for two bugs.
Thanks,
-Mike
======================Hi Wil,
We investigated the wordpress user. It has full permissions for the entire database, which presumably includes wp_redirection_*. We couldn’t find any evidence of unique table-level permissions.
Any thoughts?
I’m having the same issue. Upgraded to 3.0.4, and suddenly I can’t add or edit any redirections. It tells me, “Sorry, but your redirection was not created”. I’m afraid to delete the plugin because I don’t want to lose all the redirections that are still working.
Thanks.
Forum: Fixing WordPress
In reply to: calling a plugin in a php sidebarFound the solution here:
http://wp-cms.com/template-development/inserting-wordpress-shortcode-outside-the-loop-in-a-template/
<?php echo do_shortcode(‘[easy_sign_up title=”title text”]’); ?>
Forum: Fixing WordPress
In reply to: calling a plugin in a php sidebarDoes anybody else have any ideas for this one? Surely plugins have been used in themes before…
Forum: Fixing WordPress
In reply to: calling a plugin in a php sidebarUmm, not sure how that helps. I need to call a plugin using PHP, not the shortcut text. Any clues?
Forum: Fixing WordPress
In reply to: wp_users table is suddenly emptyI figured this out. I exported the wp_users table from a functional blog and imported it into the nonfunctional table.