Plop Forum

General Category => Sitemap generator, other tools => Topic started by: txmodxoops on July 21, 2017, 16:53:05 PM

Title: Sitemap in Joomla Site
Post by: txmodxoops on July 21, 2017, 16:53:05 PM
Hi!

I put the file on a joomla site, unfortunately using a cron on the server, I can not always control it manually.
The final urlset tag is not closed, it is missing.
Sitemap Version 2.1

Thanks
Title: Re: Sitemap in Joomla Site
Post by: txmodxoops on July 21, 2017, 17:42:37 PM
For the sake of completeness, I added these php code lines to the beginning of the file if they can serve for later versions.

// Set the start URL. Here is https used, use http:// for non SSL websites.
// URL Association for SSL and Protocol Compatibility
$http = 'http://';
if (!empty($_SERVER['HTTPS'])) {
    $http = ($_SERVER['HTTPS'] === 'on') ? 'https://' : 'http://';
}
define ("SITE", $http."www.site.com");
Title: Re: Sitemap in Joomla Site
Post by: Elmar on July 22, 2017, 06:10:23 AM
Quote from: txmodxoops on July 21, 2017, 16:53:05 PM
The final urlset tag is not closed, it is missing.

Do you run the script with the php program (cli) or with wget (or similar as website)?

Elmar
Title: Re: Sitemap in Joomla Site
Post by: txmodxoops on July 23, 2017, 13:36:06 PM
The program is notepad++
Title: Re: Sitemap in Joomla Site
Post by: Elmar on July 23, 2017, 13:44:37 PM
Quote from: txmodxoops on July 23, 2017, 13:36:06 PM
The program is notepad++

??? I mean, how do you run the php script. Not how you view the xml file.
Title: Re: Sitemap in Joomla Site
Post by: txmodxoops on July 24, 2017, 15:02:34 PM
Through a cron job on the linux server
Title: Re: Sitemap in Joomla Site
Post by: Elmar on July 24, 2017, 15:05:00 PM
Quote from: txmodxoops on July 24, 2017, 15:02:34 PM
Through a cron job on the linux server

How does the cron job line look like?
Title: Re: Sitemap in Joomla Site
Post by: txmodxoops on July 24, 2017, 15:08:20 PM
Command linux + https://www.mysite.com/sitemap-2.1.php
Title: Re: Sitemap in Joomla Site
Post by: Elmar on July 24, 2017, 15:52:13 PM
It seems you don't understand what information I need from you to help you. I give up.
Title: Re: Sitemap in Joomla Site
Post by: txmodxoops on July 24, 2017, 18:33:34 PM
Can you explain me better please? Thank you
Title: Re: Sitemap in Joomla Site
Post by: txmodxoops on July 24, 2017, 18:47:29 PM
I sent you a private message with the code
Title: Re: Sitemap in Joomla Site
Post by: txmodxoops on July 24, 2017, 20:54:38 PM
I had forgotten to specify that the problem came after switching to php 7