Sterc / seosuite

This repository contains the SEOSuite 2.x MODX extra.
GNU General Public License v2.0
13 stars 18 forks source link

Don't use removed system setting: server_protocol #90

Closed bYemma closed 1 year ago

bYemma commented 1 year ago

The system setting server_protocol is used in the plugin to compare 404 URLs. https://github.com/Sterc/seosuite/blob/ff1c785fcd4691b138e03f499fe42784a7f5a2b2/core/components/seosuite/src/Plugins/Redirects.php#L96 However, the setting is out of date and not present in a default installation. As a result, the 404 calls are not logged.

This is the pull request where the system setting was removed: https://github.com/modxcms/revolution/pull/14877

Maybe the constant MODX_URL_SCHEME or the global server variable $_SERVER['HTTPS'] can be used instead to find out the protocol. https://github.com/modxcms/revolution/blob/fbf126690f6ce903faeaeb9f1d958211fc2203c9/core/docs/config.inc.tpl#L49-L57


Also server_protocol is used on another line as a fallback, but has it's own fallback to "http". So there's no unexspected behaviour. https://github.com/Sterc/seosuite/blob/fababd4ccda596e752ecb6e4d126436335206c46/core/components/seosuite/src/Processors/Mgr/Resource/Preview.php#L36

ilyautkin commented 1 year ago

Fixed in 3.1.3