YAFLogo

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
2 years ago
Okay, I hope this won't paint me as a complete loser, but I've had a long few days here. I tries to upgrade my current build (2.4.1) to the new 3.0 and let's just say, it did not play well with others. Eventually I'll try it again when I have more time to deal with it, but for now I've had to revert back to my old version. After I re-established the database and uploaded by backup files, though, when you click on a topic, it won't take you to the first unread post, it just takes you to the message board main page. So, obviously, one of the files is either missing or got lost in translation. So, all that being said, what shoud I be looking at?

You can see what's happening here: https://www.intanibase.com/index.aspx. 

 

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
2 years ago
The file that handles the url rewriting is the urlrewriter.config. Did you restore that file too?
eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
2 years ago
I did, yes, so we'll start there. Here's my URLRewriter file. Anything missing?

<rewriter>
<!-- Advanced URL Rewriting Format -->
<rewrite url="^~/(.+?)?error.aspx$" to="~/$1error.aspx" processing="stop" />
<rewrite url="^~/(.+?)?install/default.aspx?('?(.+))?$" to="~/$1install/default.aspx?$2" processing="stop" />
<rewrite url="^~/(.+?)?install/$" to="~/$1install/default.aspx?$2" processing="stop" />
<rewrite url="^~/(.+?)?info?'?i=([0-9]+?)&url'=(.+)$" to="~/$1forum.aspx?g=info&i=$2&url=$3" processing="stop" />
<rewrite url="^~/(.+)?topics/([0-9]+)-((.+))?(/page([0-9]+))('?(.+))?$" to="~/$1forum.aspx?g=topics&f=$2&p=$6&$7" processing="stop" />
<rewrite url="^~/(.+)?topics/([0-9]+)-((.+))?('?(.+))?$" to="~/$1forum.aspx?g=topics&f=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?/category/([0-9]+)-((['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+))?('?(.+))?$" to="~/$1/forum.aspx?g=forum&c=$2&$6" processing="stop" />" processing="stop" />
<rewrite url="^~/(.+)?posts/t([0-9]+)-((.+))?(/page([0-9]+))('?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&p=$6&$8" processing="stop" />
<rewrite url="^~/(.+)?posts/t([0-9]+)-((.+))?('?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?posts/m([0-9]+)-((.+))?('?(.+))?$" to="~/$1forum.aspx?g=posts&m=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?userprofile/([0-9]+)-((.+))?$" to="~/$1forum.aspx?g=userprofile&u=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?admin/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?('?(.+))?$" to="~/$1forum.aspx?g=admin_$2_$3&$5" processing="stop" />
<rewrite url="^~/(.+)?admin/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?('?(.+))?$" to="~/$1forum.aspx?g=admin_$2&$4" processing="stop" />
<rewrite url="^~/(.+)?moderate/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?('?(.+))?$" to="~/$1forum.aspx?g=moderate_$2_$3&$5" processing="stop" />
<rewrite url="^~/(.+)?moderate/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?('?(.+))?$" to="~/$1forum.aspx?g=moderate_$2&$4" processing="stop" />
<rewrite url="^~/(.+)?profile/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?('?(.+))?$" to="~/$1forum.aspx?g=profile_$2_$3&$5" processing="stop" />
<rewrite url="^~/(.+)?profile/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?('?(.+))?$" to="~/$1forum.aspx?g=profile_$2&$4" processing="stop" />
<rewrite url="^~/(.+)?account/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?('?(.+))?$" to="~/$1forum.aspx?g=account_$2_$3&$5" processing="stop" />
<rewrite url="^~/(.+)?account/(['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+)?('?(.+))?$" to="~/$1forum.aspx?g=account_$2&$4" processing="stop" />
<rewrite url="^~/(.+)?feed/([0-9]+)-f([0-9]+)-((.+))?$" to="~/$1forum.aspx?g=feed&feed=$2&f=$3" processing="stop" />
<rewrite url="^~/(.+)?feed/([0-9]+)-c([0-9]+)-((.+))?$" to="~/$1forum.aspx?g=feed&feed=$2&c=$3" processing="stop" />
<rewrite url="^~/(.+)?feed/([0-9]+)-t([0-9]+)-((.+))?$" to="~/$1forum.aspx?g=feed&feed=$2&t=$3" processing="stop" />
<rewrite url="^~/(.+)?feed/([0-9]+)-((.+))?$" to="~/$1forum.aspx?g=feed&&feed=$2" processing="stop" />

<if url="^((?!signin-|sitemap'.xml'.ashx|'.asmx|'.axd|'.gif|'.png|'.jpg|'.ico|'.pdf|'.css|'.js|install|error|auth'.aspx|default'.aspx|popup'.aspx|advanced'.aspx|digest'.aspx|api).)*$">
<rewrite url="^~/forum/(.+)?'?(.+)?$" to="~/forum/forum.aspx?g=$1&$2" processing="stop" />
<rewrite url="^~/forum/(.+)?$" to="~/forum/forum.aspx?g=$1" processing="stop" />
<rewrite url="^~/forum/(.+)?'.aspx$" to="~/forum/forum.aspx?g=$1" processing="stop" />
</if>
<if url="^((?!'api).)*$">
<rewrite url="^~/forum/api/(.+)?$" to="~/api/$1" processing="stop" />
</if>
</rewriter>
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
2 years ago
Yes the findunread entries are missing

<rewrite url="^~/(.+)?posts/t([0-9]+)findunread-((['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+))?('?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&find=unread&$7" processing="stop" />

and


<rewrite url="^~/(.+)?posts/m([0-9]+)findunread-((['p{Ll}'p{Lu}'p{Lt}'p{Lo}'p{Nd}'p{Pc}-]+))?('?(.+))?$" to="~/$1forum.aspx?g=posts&m=$2&find=unread&$7" processing="stop" />
eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
2 years ago
Never mind ... I was able to find the corrected lines in an old file of mine.

Didn't work. It throws a configuration error.

Next problem:

User profile URLs also now lead to the forum index. The scripted popup that appears when hovering over a username displays the following instead of profile details:

Sorry, no data found or something went wrong.SyntaxError: JSON.parse: unexpected character at line 3 column 1 of the JSON data

 

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
2 years ago

Never mind ... I was able to find the corrected lines in an old file of mine.

Didn't work. It throws a configuration error.

 

Originally Posted by: eutychus 

Sorry it seems the output for the code block gets messed up

Next problem: User profile URLs also now lead to the forum index.

Originally Posted by: eutychus 

The scripted popup that appears when hovering over a username displays the following instead of profile details:

Sorry, no data found or something went wrong.SyntaxError: JSON.parse: unexpected character at line 3 column 1 of the JSON data

Originally Posted by: eutychus 

 

Both issues are caused by missing entries in the urlrewriter.config

 UrlRewriter.zip You have insufficient rights to see the content. This should be the correct config file. For your version

 

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
2 years ago
Thanks! Everything seems to be working well now except for one thing: the "Thank" button doesn't seem to work.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
2 years ago

Thanks! Everything seems to be working well now except for one thing: the "Thank" button doesn't seem to work.

Originally Posted by: eutychus 

I assume your site is based on the yaf sample application? If yes then you need to apply the changes from the commit here.,..

https://github.com/YAFNET/YAF.SampleWebApplication/commit/a28a16e40a68514dc05461fcddfe3adfb7392abc 

Global.asax needs to inherit from YafHttpApplication not from HttpApplication