1 jan_kirk Nov 27, 2018 11:44
3 amoun Nov 27, 2018 13:43
4 jan_kirk Nov 27, 2018 16:53
On the skin which loads, it was set to always https. I changed it to 'both'.
On the _sitemap skin the only setting I found was under system (pic attached at the end).
(it doesnt seem that I can install it for a blog (edit: use it for a blog), even if I wanted to as a test)
Note: But my main concern is that, in what seems to be the _sitemap skin, it begins to load a normal webpage (with menu, etc.), instead of some text output, which is a sitemap ?
Is it really using the _sitemap skin or what is happening ?
5 jan_kirk Nov 27, 2018 16:54
6 amoun Nov 27, 2018 17:54
404 ??
I can get to https://www.spiritwalkabout.com/skins/_sitemap/index.main.php so it isn't permissions.
You could put temp text in the [/skins/_sitemap/index.main.php]
echo "Hello! this file is accessible";
die();
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
then move the two lines down the file to find out where it bombs out
7 amoun Nov 27, 2018 20:44
The only other thing I can think of is somewhere the base url is being set before the skin is called
No it can't be that as the other skin does get called ???
Looking at the source code for https://www.spiritwalkabout.com/sitemap_a1.php
Line 23 :: https://www.spiritwalkabout.com/xmlsrv/rsd.php?blog=1
<body class="desktop_device page_notcached coll_1 disp_404 detail_404-sitemaps-disabled item_none anonymous evo_toolbar_hidden usergroup_none">
8 jan_kirk Nov 28, 2018 07:20
If I move this:
echo "Hello! this file is accessible";
die();
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
In: https://www.spiritwalkabout.com/skins/_sitemap/index.main.php
Then it dies on the very first line (when accessed directly):
$Timer->resume( 'prepare list' );
With the error:
Fatal error: Uncaught Error: Call to a member function resume() on null in /var/www/spiritwalkabout.com/public_html/skins/_sitemap/index.main.php:13 Stack trace: #0 {main} thrown in /var/www/spiritwalkabout.com/public_html/skins/_sitemap/index.main.php on line 13
About your 2nd post:
I can find this when using the inspecting tool:
<body class="desktop_device page_notcached coll_1 disp_404 detail_404-sitemaps-disabled item_none anonymous evo_toolbar_hidden usergroup_none">
But what does it mean?
- That sitemaps are disabled for the 404 page only, the blog, or the whole site ?
When I see it I think, perhaps this is to prevent a crawler from registering the 404 page and becoming searchable ?
Does most skins have a variable you can edit manually to allow/forbid sitemaps ?
9 amoun Nov 28, 2018 11:19
Sorry my instructions may not be clear the only code to add/move is
echo "hello";
die()
If you move the other line then yes is will do as you said. However by removing the original line 11 and the failure as you describe does show that the file fails at the first instruction
$Timer->resume( 'prepare list' );
confirming the previous error message indicates a failure of the skin being defined. ?*? I'm a bit slow at this :)
I'm going back to basics
1) Unlike other skins it isn't installed actively it's just in the [/skin] folder
2) If you upgrade ensure that the skin is the same version, in [_skin.class.php] though you had this problem with 6.10.2 ???
3) I've ttried removing the line
$Timer->resume( 'prepare list' );
and I get errors/warning but the output has details but no formatting.
See if you can at least get the output in 3) and then it's just this defing issue
10 amoun Nov 28, 2018 11:33
Been messing for an hour or two
Can you try commenting out line 11 and 13 and see if you get any output ?
//if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
//$Timer->resume( 'prepare list' );
For example my output then becomes as at http://calstock.org.uk/sitemap_vow.php
11 jan_kirk Nov 28, 2018 12:13
If I outcomment like this:
/ if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
$Timer->resume( 'prepare list' ); /
And call directly again: https://www.spiritwalkabout.com/skins/_sitemap/index.main.php
Then it just fails at the next line:
load_class( '/items/model/_itemlistlight.class.php', 'ItemListLight' );
with:
Fatal error: Uncaught Error: Call to undefined function load_class() in /var/www/spiritwalkabout.com/public_html/skins/_sitemap/index.main.php:15 Stack trace: #0 {main} thrown in /var/www/spiritwalkabout. com/public_html/skins/_sitemap/index.main.php on line 15
(Thought: does the failure happen because because of direct call)
So, some code is somehow not available (?) to index.main.php, and then it does a fallback of some kind I guess.
But how the code is not available, I guess that's the question now. Is it a setting of mine, or ?
The version in _skin.class.php is correct (6.10.4), amd it was also correct (6.10.2) before I upgraded.
12 amoun Nov 28, 2018 12:30
Until someone comes up with a proper solution re the fault, I can only suggest making a new skin from scratch. In doing so you will see if is defined. If it is then you can change the content to that of the sitemap skin.
I'm tempted to try and just take the code and put it in another named skin that does work.
I think I would try modifying the [/skins/basic], which I don't use and input the code form the sitemap and see if it gives the wanted out put.
13 amoun Nov 28, 2018 12:51
I've changed my [/skin/basic] to the sitemap and it works as expected when I installed is as my main skin
I deleted all the files in the skin replaced them with the two from sitemap and change line 18 in _skin.class.php
class basic_Skin extends Skin
14 amoun Nov 28, 2018 12:56
Have now changed the $tempskin = 'basic'; in my [/sitemap_vow.php] and it also works fine
Going off-line now. Good luck. Speak latter
15 jan_kirk Nov 28, 2018 15:13
Well, finally something happened.
I did as you did:
Deleted files in basic, put the 2 files from _sitemap, renamed to 'basic' in that line in _skin.class.php
I kept the skin setting type as standard (not XML sitemap)
I chose to install the skin in my blog no 5.
If I do that the I get the sitemap output.
So now I can generate a sitemap, but my webpage are not worth much if the user sees a XML sitemap instead of a webpage.
If I keep my normal skin (business) and set $blog=5 and $tempskin='basic' in the stub file then I am back to a normal fallback loading of menu etc. but a 404 page instead of content.
So it seems, when I am loading the skin via the stub then it looks in the wrong place for something ??
16 amoun Nov 28, 2018 17:44
You can make a collection that is a combined collection then have the skin like the sitemap for now.
Clearly though there is a problem neither of us can find yet.
17 jan_kirk Nov 29, 2018 05:53
That could be a workaround for now.
But I would very much like to find the problem, whatever it is, it could affect other things too.
Thank you so much for all your help Amoun :-)
18 fplanque Jun 19, 2019 01:24
Making a sitemap is actually super easy. Sorry the man page was out of date. It's updated now:
https://b2evolution.net/man/xml-sitemap
Is there a setting that allows for an https connection in your OK skin and not one for the sitemap?
I've seen 404 issues as a consequence of settings in the image in next post
Edited this and then can't add image ??