Recent Topics

403 error when trying rss on comment feed

Started by on Jul 24, 2019 – Contents updated: Jul 27, 2019

Jul 24, 2019 12:51    

Just as a starter, following on from page https://forums.b2evolution.net/rss-bug-in-boostrap_blog_skin

I have never used rss but have read about it ??
I have added rss to both the posts and comments following instructions at https://b2evolution.net/man/item-feeds-features

I can't get the rss link on my individual posts but the one on the comments works as follows

Clicking on the rss options I get a 403 warning the url being
https://calstock.org.uk/skins/elf_zen/?disp=comments&p=674

403 error when trying rss on comment feed

https://calstock.org.uk/skins/atom/?disp=comments&p=674
https://calstock.org.uk/skins/rss/?disp=comments&p=674
https://calstock.org.uk/skins/rss2/?disp=comments&p=674

all bring up the comment

So
a) why is comment rss link using my custom skin and producing the 403?
b) do both the posts and comments feed use the settings in the above image?

Complete URL where problem appears :https://calstock.org.uk/2015/09/19/the-first-six-pears#c371
Name or URL of your webhost :krystal.co.uk
Exact b2evolution version :6.11.2

Jul 24, 2019 16:11

Trying to find why I have /myCustomSkin/in the url
Looking at /inc/items/model/_item.class.php v6.11.2

		$url = $this->get_feedback_feed_url($skin);

		echo $before;
		echo '<a href="'.$url.'">'.format_to_output($title).'</a>';
		echo $after;
	}

Does $skin push /myCustomSkin/ into the URL ?

	/**
	 * Get URL to display the post comments in an XML feed.
	 *
	 * @param string
	 */
	function get_feedback_feed_url( $skin_folder_name )
	{
		$this->load_Blog();

		return url_add_param( $this->Blog->get_tempskin_url( $skin_folder_name ), 'disp=comments&amp;p='.$this->ID );
	}

Is the above code that which should/is attached to the comment RSS feed link?

Jul 24, 2019 18:33

Having never used the RSS what does the link [Comment feed for this post] supposed to do?

Jul 24, 2019 20:26

Looking at this site it makes some sense in that the link URL uses the tempskin=_rss2 . Clicking on it brings up an XML page which I can subscribe to and places a bookmark on my Firefox toolbar.
What is doesn't do is bring up a list of the comments for the post.
So Comment feed for this post is really only an rss for that single comment, is that because it is seen as a post on the forum?

So it may be a skin problem or a URL setting problem

Jul 24, 2019 21:20

Ok I have found this.

The atom URL looks ok, but I can check it as I can't find a link

Changing the rss feed URL to
https://calstock.org.uk/?tempskin=_rss2&redir=no
gives a 403 on https://calstock.org.uk/evoadm.php

I'm now suspecting a host ?mod_security issue so about to disable it.

Ok disabling mod security did allow me to set the path as above to
https://calstock.org.uk/?tempskin=_rss2&redir=no
but the link under the comment still has the ..../myCustomSkin/ so no change

Jul 27, 2019 14:51

Getting nowhere slowly. Have been fumbling around trying to sort this. The closest I have got is to find in _item_feedback.ic.php

if( $Item->can_see_comments( false ) && ( $params['disp_comments'] || $params['disp_trackbacks'] || $params['disp_pingbacks'] || $params['disp_webmentions'] ) )
{	// user is allowed to see comments
	// Display link for comments feed:
	$Item->feedback_feed_link( '_rss2', '<nav class="evo_post_feedback_feed_msg"><p class="text-center">', '</p></nav>', $params['feed_title'] );
}

I have just thought it may the the version, the above being fallbackv6 so i replaced it with v5 but exactly the same.

The line
$Item->feedback_feed_link( '_rss2', '<nav class="evo_post_feedback_feed_msg"><p class="text-center">', '</p></nav>', $params['feed_title'] );

contains
$Item->feedback_feed_link( '_rss2', which looks like the link which is malformed, not just in my site but also at

https://www.npo-consulting.net/blogs/notepad.php/the-new-klondike-intoxication-nuggets-in-silicon-valley or any other page.

from post https://forums.b2evolution.net/rss-bug-in-boostrap_blog_skin

So I still have to consider that the 403 is a host failure and so the link goes to a default domain.com/skins/chosen_skin

???

Jul 27, 2019 16:41

OK I have it working but why did I have to do this.
In skin found _item_feedback_inc.php as mentioned before
In file found $Item->feedback_feed_link
Using windows search find feedback_feed_link >> in/inc/items/_item.class.php
from there in same file feedback_feed_url found
$url = $this->get_feedback_feed_url($skin);

Edit file _item.class.php and so as not to delete or comment it out by follow the above line with
$url = 'https://calstock.org.uk/?tempskin=_rss2';

Now link is fine and the rss link works.

The above value for get_feedback_feed_url comes form the function

function get_feedback_feed_url( $skin_folder_name )
	{
		$this->load_Blog();

		return url_add_param( $this->Blog->get_tempskin_url( $skin_folder_name ), 'disp=comments&amp;p='.$this->ID );
	}

So though working I now want to find why the function didn't work and provide the right url ???

UPDATE: :( Not quite right as it brings up, an as yet undetermined by me, a list of comments, but getting there

Jul 27, 2019 17:15

With a bit more fiddling with the core file /inc/items/_item.class.php the rss now does just bring up an option for subscribing to the comments of just the post that is being viewed.

    
if( $title == '#' )
		{
			$title = get_icon( 'feed' ).' '.T_('Comment feed for this post');
		}

		//$url = $this->get_feedback_feed_url($skin);
		$url = 'https://calstock.org.uk/?tempskin=_rss2';

		echo $before;
		echo '<a href="'.$url.'&disp=comments&amp;p='.$this->ID.'">'.format_to_output($title).'</a>';
		echo $after;

So this is a break. Back to finding why later :)

I've had a sneaking vision it maybe a version issue 6.11.2 :: ancient skin and maybe a mix of fallbackv5 an v6 but I did try a clean and fresh skin and it was the same so maybe not.

maybe I'm missing a setting somewhere.


Form is loading...

Bootstrap back-end – This forum is powered by b2evolution CMS, a complete engine for your website.