Drupal node?destination not working - drupal

I've troubles with Drupal 6 and (maybe) mod_rewrite:
if I go to http://127.0.0.1/drupal/node/115/edit?destination=admin%2Fcontent%2Fnode and then I save the node, I don't get redirected to admin/content/node, but it directs me to node/115 :-(
Why??
In my .htaccess I uncommented: RewriteBase /drupal (because my drupal path is /var/www/htdocs/drupal)
My server is running Apache 2.2.4 on Slackware 12
Any help I'll be appreciated :D

It does look like a configuration problem, because this normally works. You can debug it by adding some dsm() dumps in includes/common.inc/drupal_goto() : this is where the destination parameter is processed.
Note that if some module traps your form submission, for instance by declaring a _validate or _submit handler, it can very well change the redirection information: check whether you can reproduce this without contrib modules enabled.

Related

Using uninitialized "redirecttoindex" variable

Suddenly out of nowhere I can not log in into my WordPress site. The site is working but wp-admin is not. In the error log I get:
2022/07/04 23:45:58 [warn] 31793#31793: *300658 using uninitialized "redirecttoindex" variable, client: ip.000.000.000, server: mydomain.com, request: "GET /wp-admin/HTTP/2.0", host: "mydomain.com"
How can I debug this? I have just got this site for maintenance and I am not very familiar with WordPress. Should I diff it with the original version and see if files are modified?
I scanned the code and there are no redirecttoindex variables. Is something up with nginx?
I also can not find anything on google with such a query.
Server API: FPM/FastCGI
PHP Version 7.4.26
nginx/1.20.2
You confirm the other pages in the sites this working well ? If the answer is Yes, you need the check if exists some plugin what redirect the route of wp-admin for new route. First we have to activate the debug mode in the wordpress in the file wp_config find de const WP_DEBUG and set true.
P.S: DonĀ“t activate the DEBUG in the product view.

Error KnpSnappyBundle / wkhtml - ConnectionRefusedError

I have an incomprehensible problem.
I have used this bundle many times, and I understand the main logic to generate a pdf from a twig view.
But on my two last project i have this kind of error:
Error: Failed to load https://mydomain/bundles/bundle/css/bootstrap.css, with network status code 1 and http status code 0 - Connection refused
Exit with code 1 due to network error: ConnectionRefusedError
I have tried:
HTTP and HTTPS url
chmod 777 on var/cache folder - try acl
disable all parameters of wkhtml
update wkhtml
Disable extends twig view - ihave made a new file with full HTML
Clean controller use assets
filter / absolute_url filter / or web_url variable to prefix assets
On my development environment (Windows), i didn't have any problem.
This problem appeared when I work on production environment, based on Debian 9 with nginx, php 5.6, mariadb 10.0* and letsencrypt certificate.
I can't load any assets for now.
Does anyone have an idea??
Ok i have found a workaround. I use this trick :
create a global variable with this path :
pdf_url: '%kernel.root_dir%/../web'
then i call my assets like this :
<link href="{{ pdf_url}}/bundles/css/bootstrap.css" rel="stylesheet">
Its a not the ebst solution, but its works.

cakephp 3.6 can't Display Image

I have problem when I Try Display Image on my login page It doesn't appear
<?= $this->Html->image('crm.jpg', ['alt' => 'User image']); ?>
When I check the console on Chrome
Failed to load resource: the server responded with a status of 404 (Not Found)
When I try accessing http://localhost/intellix/img/crm.jpg it says
Error: ImgController could not be found.
Which isn't needed.
crm.jpg is located in webroot/img/
Now the weird part if i change crm with another image name ex: silhouette.png it works fine but so far it only worked with this one
Any Ideas ?
(Note : Using Chrome Cakephp Sublime text Up to date)
Edit : I had the same problem trying to load CSS Scripts Files
It seems that your image crm.jpg does not exist. In this case, CakePHP is routing the request to ImgController. Is the image silhouette.png located in the same directory?
A second thing might be the access right. Maybe it is not readable? Check the access rights and make it at least readable for all.
the problem was indeed in access right in this file
.htaccess inside webroot folder
There was this line which I added
RewriteRule ^(.*)$ index.php [QSA,L]
Restoring it to default Removing it did the trick

Moving Wordpress website to another server

A friend of mine asked me to move wordpress website from development server to production. I've copied all the files, backed up and restored database. After that I'd changed sitename and home values in database (_options table) to new domain and it started. Though only home page is working fine. When I navigate to any other page it gives me 500 error. In error_log I got following errors:
1423021301: /home1/crankst1/public_html/fish-dev-site/ssv3_payload_extractor-r0Xkqq2xFD.php startup
[24-Feb-2015 19:16:59 UTC] PHP Warning: require_once(/home1/crankst1/public_html/fish-dev-site/wp-content/plugins/js_composer_theme/include/classes/core/class-vc-sort.php): failed to open stream: No such file or directory in /home1/crankst1/public_html/fish-dev-site/wp-content/plugins/js_composer_theme/js_composer.php on line 168
[24-Feb-2015 19:16:59 UTC] PHP Fatal error: require_once(): Failed opening required '/home1/crankst1/public_html/fish-dev-site/wp-content/plugins/js_composer_theme/include/classes/core/class-vc-sort.php' (include_path='.:/usr/php/54/usr/lib64:/usr/php/54/usr/share/pear') in /home1/crankst1/public_html/fish-dev-site/wp-content/plugins/js_composer_theme/js_composer.php on line 168
Paths that cause errors are related to development server and I can't find where to change them. I'm not very good with wordpress, so I suppose that solution should be very simple.
I'm sure there is an issue with a plugin http://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431/comments?page=149 try to see if there are any hardcoded paths on the plugin dashboard.
Delete your .htaccess file then go to the permalinks page change to another permalink type save page then change back to permalink you had this will force wordpress to recreate the .htaccess file and it will allow all pages you have to show correctly on the site. :-)

Apache 2.2.16: client denied by server configuration

I have problem with my server configuration. I use Apache 2.216, PHP 5.3.3 and wordpress 3.4.2 with Shopperpress. Time to time I receive error "client denied by server configuration: path/to/file" in apache log file. It is path to _tbs.php file, but it is not problem in rights of file, because this file is called 12 times on page for getting thumbs of photos and there is error only several times. I think that it has no connection to concrete photo, because once this photo is displayed corectly and next time same photo produce error.
Do you have any idea what can be reason?
Thank you for all advices.
Viktor
I think thats a problem by the configuration of MaxClients or MaxRequestsPerChild.
Try to restore the default configuration and try it again. If that not works, reinstall Apache and purge the old configuration.
You have given very little information. It is not clear under what conditions do you work (OS, installed modules, Log entrys,...).
WordPress 3.4.2 is very old and safety-relevant. Please update WordPress and your WP-Plugins.
Go to you VHOST-file and replace:
Deny from all
Allow from 127.0.0.0/255.0.0.0
with:
Require all granted
This cause for old Config-Files and newer Apache-Version. Since Apache 2.4.3 a new security feature is added.

Resources