Pretty URLs

Started by SMFHacks.com Team, January 31, 2007, 10:56:43 AM

Previous topic - Next topic

mark7144

Quote from: Dannii on September 12, 2008, 10:05:12 PM
mark, would something like this work?
The way I did my redirect was correct but your mod seems to mess it up... I tried your way but it gave a Internal Server Error.

snah

I have a recurring error in the error log and is due to a problem with the mod Pretty url in the file Display.php line 77.


This is the error:

Quote/index.php?pretty;board=76;topic=and191como-organizamos-nuestras-colecciones.msg6141&topicseen

8: Undefined index: board

/Sources/Display.php
Línea: 77

Line 77 contains this:

Quote
if ((isset($context['pretty']['oldschoolquery']) || $context['pretty']['query_string']['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])

   
The mods that I have installed are:

YouTube BBCode

   
The version of SMF is:

1.1.6

axlarry

After reading this whole thread, I believe the biggest problem in PrettyUrls is 500 Internal Server Error.
My forum is getting this error  even more frequently now. Members are also getting the same error. Sometimes I need to refresh a page to load correctly.
Can you please have a look on this please?

mark7144

Quote from: axlarry on September 13, 2008, 12:59:34 PM
After reading this whole thread, I believe the biggest problem in PrettyUrls is 500 Internal Server Error.
My forum is getting this error  even more frequently now. Members are also getting the same error. Sometimes I need to refresh a page to load correctly.
Can you please have a look on this please?
Does this happen replying to a thread or just general browsing?

Lavarinth

Quote from: Dannii on September 12, 2008, 04:44:13 AM
Quote from: Lavarinth on September 11, 2008, 04:48:54 PM
So I read your past, Dannii, and went ahead with the install, and in an attempt to "maintain" the site and forum I've been running a Site Index Generator on it, and was not sure whether the following issue was related to the mod or the forum theme:

Every thread page returns a 404 on the following two URLs:
www.site.com/forum/board/thread/smf_images_url
www.site.com/forum/board/thread/smf_scripturl
www.site.com/forum/board/thread/##/smf_images_url
www.site.com/forum/board/thread/##/smf_scripturl
www.site.com/forum/board/thread/msg###/smf_images_url
www.site.com/forum/board/thread/msg###/smf_scripturl
etc.

I checked the source of any thread page, and the following is set:

var smf_images_url = "http://www.campaigncreations.org/forum/Themes/CampaignCreations/images"; [nofollow]
var smf_scripturl = "http://www.campaigncreations.org/forum/index.php"; [nofollow]

Which, based on my site and theme, are proper to my knowledge.

I don't recall experiencing this issue before, when creating a site index through a generator. Any ideas? Thanks in advance!
What's a "site index generator"??

Haha, alright- A site index generator creates a sitemap.xml used by Google, Yahoo, etc. (You upload it on your FTP to be read.) It uses webcrawlers to go to each page and follow links within those pages as well so long as they remain on your domain, sometimes links even we don't see (it searches source code). So, for some reason, it's spotting links to the URLs I listed, but it's returning those links as 404 (those pages don't exist), typically caused by a missing page (ex: page123.html no longer there) or the folder has no pages and no index page (index.php/html/asp). However, the variables smf_images_url and smf_scripturl redirect to the pages specified, one being a folder (with no index, just images, likely fixable) another being the forum index. Chances are instead of using these variables, I believe instead it's creating a blank URL instead of actually redirecting, but I could (and most likely am) wrong.
- - Lavarinth
http://www.campaigncreations.org [nofollow]

runebergen



I moved forum to a new server that is going live soon...

but the pretty url filters are all wrong now, and i cant even log in...

Is there a way to turn off pretty urls without logging in as admin, such as through mysql.. ?

Dannii

Quote from: mark7144 on September 13, 2008, 08:51:50 AMThe way I did my redirect was correct but your mod seems to mess it up... I tried your way but it gave a Internal Server Error.
Maybe try using a RewriteRule with R=301?

Quote from: axlarry on September 13, 2008, 12:59:34 PMAfter reading this whole thread, I believe the biggest problem in PrettyUrls is 500 Internal Server Error.
My forum is getting this error  even more frequently now. Members are also getting the same error. Sometimes I need to refresh a page to load correctly.
Can you please have a look on this please?
Well I've never experienced this myself, and noone's been able to give any helpful info, except possibly that the video embedding mod is the problem. Do you have it installed?

Quote from: Lavarinth on September 13, 2008, 05:30:07 PM
Quote from: Dannii on September 12, 2008, 04:44:13 AM
Quote from: Lavarinth on September 11, 2008, 04:48:54 PM
So I read your past, Dannii, and went ahead with the install, and in an attempt to "maintain" the site and forum I've been running a Site Index Generator on it, and was not sure whether the following issue was related to the mod or the forum theme:

Every thread page returns a 404 on the following two URLs:
www.site.com/forum/board/thread/smf_images_url
www.site.com/forum/board/thread/smf_scripturl
www.site.com/forum/board/thread/##/smf_images_url
www.site.com/forum/board/thread/##/smf_scripturl
www.site.com/forum/board/thread/msg###/smf_images_url
www.site.com/forum/board/thread/msg###/smf_scripturl
etc.

I checked the source of any thread page, and the following is set:

var smf_images_url = "http://www.campaigncreations.org/forum/Themes/CampaignCreations/images";
var smf_scripturl = "http://www.campaigncreations.org/forum/index.php";

Which, based on my site and theme, are proper to my knowledge.

I don't recall experiencing this issue before, when creating a site index through a generator. Any ideas? Thanks in advance!
What's a "site index generator"??

Haha, alright- A site index generator creates a sitemap.xml used by Google, Yahoo, etc. (You upload it on your FTP to be read.) It uses webcrawlers to go to each page and follow links within those pages as well so long as they remain on your domain, sometimes links even we don't see (it searches source code). So, for some reason, it's spotting links to the URLs I listed, but it's returning those links as 404 (those pages don't exist), typically caused by a missing page (ex: page123.html no longer there) or the folder has no pages and no index page (index.php/html/asp). However, the variables smf_images_url and smf_scripturl redirect to the pages specified, one being a folder (with no index, just images, likely fixable) another being the forum index. Chances are instead of using these variables, I believe instead it's creating a blank URL instead of actually redirecting, but I could (and most likely am) wrong.
It looks like the generator has been written badly... have you tried the sitemap mod?

Quote from: runebergen on September 13, 2008, 05:50:47 PM


I moved forum to a new server that is going live soon...

but the pretty url filters are all wrong now, and i cant even log in...

Is there a way to turn off pretty urls without logging in as admin, such as through mysql.. ?
You can, by setting pretty_enabled_filters to 0. Also, check that pretty_root_url is correct.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

shaitanfr

Quote from: axlarry on September 13, 2008, 12:59:34 PM
After reading this whole thread, I believe the biggest problem in PrettyUrls is 500 Internal Server Error.
My forum is getting this error  even more frequently now. Members are also getting the same error. Sometimes I need to refresh a page to load correctly.
Can you please have a look on this please?

The problem may come from your server configuration.
You should ask your Host how many simultaneous login/query  query did he support.

For example, 2 simultaneous query in sql correspond to ~ 50 user.
Another to consider is the optimization scripts used and the number of queries necessary to generate a page.

   
I think the problem is there because if it was Pretty url, refreshing  content would not solve the problem.

Try another host/server, local Wamp, I'm almost sure it will solve the problem

My Google Translation is Bad. :)

Hoochie Coochie Man

Thanks for this beautiful mod.
İnadına SMF 1.1.X

mark7144

Before this mod was installed, I was able to put ;new#new after thread URLs which then would take members/guests to the latest posts, this functionality no longer works. Is there a work around?

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."


snah

QuoteI have a recurring error in the error log and is due to a problem with the mod Pretty url in the file Display.php line 77.

This is the error:

Quote

    /index.php?pretty;board=76;topic=and191como-organizamos-nuestras-colecciones.msg6141&topicseen

    8: Undefined index: board

    /Sources/Display.php
    Línea: 77


Line 77 contains this:

Quote

    if ((isset($context['pretty']['oldschoolquery']) || $context['pretty']['query_string']['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])


   
The mods that I have installed are:

YouTube BBCode

   
The version of SMF is:

1.1.6   


   
I looking in the database and on the table "smf_pretty_topic_urls" bears no names, saves "t834" is topic ty ID.

Before the well-kept but I did not change that now bears no names given and that's why this repetitive error in the "error log".

Dannii

That error does't have anything to do with topics... the problem is with the boards..
Can you try running maintenance?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

snah

¿Run maintenance tasks? the result is east of here below: :

Quote
    * Updating the array of actions
    * Fix old boards which have broken quotes
    * Update board URLs
    * Update the filters

But still not save the name in the database.


Hoochie Coochie Man

Hi

I have three or more topics are not showing Turkish characters in topic link. (%1 doesn't work)
But rest of it works great. Showing Turkish characters just fine. (%99 works great)

I really don't understand why? :D

Any help would be great.
Thanks.
İnadına SMF 1.1.X

bluegray

Is it normal to not get errors on pages that don't exist if PrettyUrls is installed? It seems that any nonexisting url will return the main page, but not give an error. If that is the case, how do I get proper error handling back?

Dannii

Quote from: aimarejada on September 15, 2008, 03:24:29 AM¿Run maintenance tasks? the result is east of here below: :

Quote
    * Updating the array of actions
    * Fix old boards which have broken quotes
    * Update board URLs
    * Update the filters

But still not save the name in the database.
Are you sure that index.php was modified correctly then?

Quote from: Hoochie Coochie Man on September 15, 2008, 06:07:33 AM
Hi

I have three or more topics are not showing Turkish characters in topic link. (%1 doesn't work)
But rest of it works great. Showing Turkish characters just fine. (%99 works great)

I really don't understand why? :D

Any help would be great.
Thanks.
Which characters don't work? Are they always the same ones?

Quote from: bluegray on September 15, 2008, 07:24:30 AMIs it normal to not get errors on pages that don't exist if PrettyUrls is installed? It seems that any nonexisting url will return the main page, but not give an error. If that is the case, how do I get proper error handling back?
This wouldn't really be possible... it would be very difficult at least. It tests firstly against a known list of actions, and if it's not an action assumes it's a board. It would take a huge amount of changes to make it return a 404 error.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Hoochie Coochie Man

Quote from: Dannii on September 15, 2008, 09:21:59 AM
Quote from: Hoochie Coochie Man on September 15, 2008, 06:07:33 AM
Hi

I have three or more topics are not showing Turkish characters in topic link. (%1 doesn't work)
But rest of it works great. Showing Turkish characters just fine. (%99 works great)

I really don't understand why? :D

Any help would be great.
Thanks.
Which characters don't work? Are they always the same ones?

Thanks for the reply

No, They aren't the same. It's really weird  :-X

only 3 or 5 topics have the wrong characters whole forum :-X

For example;
character (ü) is change into (u)
character (ı) is change into (i)
These are normal.

But 3 or 5 topics are like this:
character (ü) is change into (and252)
character (ı) is change into (and305)

I also find this ( ' ) is change into (and8217)

İnadına SMF 1.1.X

Dannii

Ahh, those topics are using entities. Does converting the entities to characters in maintenance work? If not report it on the SMF bugtracker.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Advertisement: