Jump to content

[Bug] IndexNow submits an ACP URL when queue runs from ACP


Go to solution Solved by Daniel F,

Recommended Posts

When manually running the queue from the ACP, the keyLocation submitted to IndexNow uses the ACP base url.

Got errors like these:

422 invalid_url Array
(
    [host] => www.site.com/
    [key] => 6c076eb62f3b43e8cf6c62a8d69dff7a
    [keyLocation] => https://www.site.com/admin/<hash>.txt
    [urlList] => Array
        (
            [0] => https://www.site.com/<url>
        )

)

 

Issue is here:

$url = \IPS\Http\Url::internal('');
$data = array(
			'host'         => \IPS\Http\Url::baseUrl(\IPS\Http\Url::PROTOCOL_WITHOUT ),
			'key'          => \IPS\Settings::i()->indexnow_key,
			'keyLocation'  => (string) $url->setPath( $url->data[ \IPS\Http\Url::COMPONENT_PATH ] .  $this->getKeyFileName() ),
			'urlList'     => $urls,
);

$url should specify the 'front' base

$url = \IPS\Http\Url::internal( '', 'front' );

 

Error happened in 4.6, but this file is not touched in 4.7.

Edited by Martin A.
Link to comment
Share on other sites

 The issue exists in  Invision Community v4.7.0

 

422 invalid_url Array
(
    [host] => xxxxxxx.com/
    [key] => 7697d70b06e915dae27366f9da877a3d
    [keyLocation] => xxxxxxx.com/admin/7697d70b06e915dae27366f9da877a3d.txt
    [urlList] => Array
        (
            [0] => https://xxxxxxx.com/messenger/12051/
        )

)
 

Edited by BertT
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...