Summary:
Support protected sites using basic authentication
Detailed Description:
I'm replicating what I entered at
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=77925&p=337035#p337035
I installed SitemapMgr as per the instructions, but could not get the default
"Pages" sitemap to be created, even after creating the required template.
In Admin Log, noticed lots of CmsJobManager lines with "Received 401 response
when trying to trigger async processing" and realized HTTP error 401 has to do
with authentication. This new site I was testing was "protected" behind
.htaccess-enabled userid/password authentication. As soon as I commented out the
authentication lines in .htaccess, then SitemapMgr immediately worked and
created the expected sitemap-pages.xml file.
Just to verify, in SitemapMgr.module.php, in function CreateSitemap, just before
$req->execute( $url );
line (#129), I inserted
$req->setAuth('myHardCodedUser', 'myHardCodedPassword');
to provide the authentication required. It worked as expected, even when the
.htaccess authentication was enabled.
Feature request is to provide input fields in the SitemapMgr admin page where,
if the site is being protected, authentication credentials can be entered.
Thanks for considering this.