WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 01.11.2023 23:09:15

losttrip
Member

SEO Tool won't save Title or Description changes

WBCE Version: 1.6.1
PHP Version: 8.1.23
SEO Tool: 0.7.1

Admin Tools > SEO Tool

When I click "ok" after making changes to Title or Description, the edit icon appears again and none of the text I enter is shown.

This is the error log:

2023-11-01T20:52:30+00:00 [Visitor Request] https://www.mysite.com/modules/wbSeoTool/ajax/save.php
2023-11-01T20:52:30+00:00 [Warning] /modules/wbSeoTool/ajax/save.php:[27] from /modules/wbSeoTool/ajax/save.php:[27] WBCE_Error->scriptError "Undefined array key "id""
2023-11-01T20:52:30+00:00 [Deprecated] /modules/wbSeoTool/ajax/save.php:[27] from /modules/wbSeoTool/ajax/save.php:[27] explode "explode(): Passing null to parameter #2 ($string) of type string is deprecated"
2023-11-01T20:52:30+00:00 [Warning] /modules/wbSeoTool/ajax/save.php:[29] from /modules/wbSeoTool/ajax/save.php:[29] WBCE_Error->scriptError "Undefined array key 1"
2023-11-01T20:52:30+00:00 [Deprecated] /modules/wbSeoTool/ajax/save.php:[31] from /modules/wbSeoTool/ajax/save.php:[31] htmlspecialchars "htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated" 

Offline

#2 02.11.2023 08:36:48

florian
Administrator

Re: SEO Tool won't save Title or Description changes

Hm... seems that $_POST is empty. Can't reproduce; any special configuration on that website, shortURL, .htaccess redirects/rewrites (forcing www or a trailing slash or sth like that)?


Sorgen sind wie Nudeln: man macht sich meist zu viele.

Offline

#3 02.11.2023 11:39:55

losttrip
Member

Re: SEO Tool won't save Title or Description changes

Yes, to all you mentioned, AND it is a sub-domain (while in development).

Here is the htaccess:

RewriteEngine On

## Set an errordocument that will be shown if one of the reserved folders are used.
ErrorDocument 404 '<h1>Not found</h1>'

### - Modify this if your WB is installed in a subdirectory. I.e. /wb/
## RewriteBase /wb/
RewriteBase /

## make google_sitemap.php visible as sitemap.xml
RewriteRule ^sitemap.xml$ google_sitemap.php [L]

## uncomment (remove #) the next lines to rewrite host to force https
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

## uncomment (remove #) the next lines to include www to your domain
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

## If old url's are called directly - redirect to short url version
RewriteCond %{REQUEST_URI} !/pages/intro.php
RewriteCond %{REQUEST_URI} /pages
RewriteRule ^pages/(.*).php$ $1/ [R=301,L]

## Send the request to the short.php for processing
RewriteCond %{REQUEST_URI} !^/(pages|admin|framework|include|languages|media|modules|account|search|temp|templates|var)/.*$
RewriteCond %{REQUEST_URI} !(\.gif|\.jpg|\.png|\.ico)$ [NC]
RewriteCond %{REQUEST_URI} !(\.css|\.js)$ [NC]
RewriteCond %{REQUEST_URI} !(\.pdf|\.json|\.xml)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([\/\sa-zA-Z0-9._-]+)$ short.php?_wb=$1 [QSA,L]

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysubdomain\.mysite\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mysubdomain\.mysite\.ca$
RewriteRule ^(.*)$ "https\:\/\/www\.mysubdomain\.mysite\.ca\/$1" [R=301,L]

Last edited by losttrip (02.11.2023 22:50:01)

Offline

#4 02.11.2023 11:56:48

florian
Administrator

Re: SEO Tool won't save Title or Description changes

So, most parts of the .htaccess come from shortURL, but this is not the reason for the issue as I have many sites with shortURL where the SEO tool works well.
So try to comment out the last three lines and check if the SEO tool will work then.
Also try to comment out the line "RewriteBase /" (not sure if needed anyway).

Btw, the "RewriteEngine on" in the 4th line from the end can be removed. RewriteEngine is already activated in the first line from top.

Last edited by florian (02.11.2023 11:57:28)


Sorgen sind wie Nudeln: man macht sich meist zu viele.

Offline

#5 02.11.2023 22:49:14

losttrip
Member

Re: SEO Tool won't save Title or Description changes

It was the last three (four) lines causing the issue.  Those lines were added by my host - domain settings (Force HTTPS Redirect).

I commented them out and the issue is gone, as are the warnings.  Thank you Florian.

Offline

Liked by:

florian

Board footer

up