Support » Plugin: Custom DataBase Tables » Update data redirection
Update data redirection
-
Hi!
I’m having a problem with the redirection after i try to update the data from a table. when i try to update it redirects me to the wordpress login interface and the changes don’t take effect.
Thanks in advance for your help
-
Hi there,
If you are blocked to access specific files by using as like “.htaccess”. Please check whether the “wp-admin.php” is allowed by using in ajax process.
Please try to refer below:
https://wordpress.org/support/topic/using-htaccess/
Thank you
Hi!
I paste that code in my htaccess but still no result. I can’t update the data of any row in my table, it redirects me out of the folder where my wordpress is:
when i try to update
https://snag.gy/HbKplN.jpgAfter I press Update here’s where it redirects me
https://snag.gy/QaRsmr.jpgthis is the htaccess i use in the public folder to redirect to “inner” folder where my wordpress is :
# BlueHost.com
# .htaccess main domain to subdirectory redirect
# Do not change this line.
RewriteEngine on
# Change example.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?intranet$
# Change ‘subdirectory’ to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/inner/
# Don’t change the following two lines.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change ‘subdirectory’ to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /inner/$1# Change example.com to be your main domain again.
# Change ‘subdirectory’ to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?intranet$
RewriteRule ^(/)?$ inner/index.php [L]<FilesMatch “(admin-ajax.php)$”>
Satisfy Any
Order allow,deny
Allow from all
Deny from none
</FilesMatch>I appreciate any help
Hi there,
I probably understood the cause of your problem by provided screenshot.
That’s contained the “inner” as middle path in your permalink structure.Please try to add code in your functions.php as follews:
function my_cdbt_shortcode_custom_component_options( $component_options, $shortcode_name, $table ){ if ( is_admin() && $shortcode_name === "cdbt-edit" ) { $component_options['actionUrl'] = admin_url( $component_options['actionUrl'] ); } return $component_options; } add_filter( 'cdbt_shortcode_custom_component_options', 'my_cdbt_shortcode_custom_component_options', 10, 3 );
Also, because your problem have not related in “.htaccess”, please remove the modified code in past.
Thank you,
-
This reply was modified 5 years, 10 months ago by
ka2.
Hi
the redirection has changed, but not to a point where the data gets updated. this time it sends me to 404 error. Please take a look a the url in the image.
https://snag.gy/67wPyD.jpgi appreciate any help
I see. Thank you for reporting.
Please change code since the last time to following.
function my_cdbt_shortcode_custom_component_options( $component_options, $shortcode_name, $table ){ if ( is_admin() && $shortcode_name === "cdbt-edit" ) { $component_options['actionUrl'] = admin_url( str_replace( '/wp-admin', '', $component_options['actionUrl'] ) ); } return $component_options; } add_filter( 'cdbt_shortcode_custom_component_options', 'my_cdbt_shortcode_custom_component_options', 10, 3 );
I think probably your problem will resolve by this code.
Thank you,
Hi!
Sadly the code generates an error in the whole website:
Fatal error: Cannot redeclare my_cdbt_shortcode_custom_component_options() (previously declared in C:\xampp\htdocs\inner\wp-content\plugins\custom-database-tables\functions.php:43) in C:\xampp\htdocs\inner\wp-content\themes\creative-blog-child\functions.php on line 19
Here is the code i used https://snag.gy/GnNVD5.jpg
-
This reply was modified 5 years, 10 months ago by
webmasterjgb. Reason: screenshot
That error was for existing already the same function name in your functios.php. You should try to remove that code if functions.php has a code that added previous.
it worked amazingly! this is agreat plugin. keep up the good work
awesome
Hi,
I was having the same issue in the backend and the code for functions.php file you provide fixed it. But how can I fix the 404 error on the front-end?
Thanks
-
This reply was modified 5 years, 10 months ago by
- The topic ‘Update data redirection’ is closed to new replies.