Pretty URLs

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

Previous topic - Next topic

smldmr

Quote from: Dannii on September 11, 2008, 12:31:26 PM

Please check your SMF and Apache error logs and report back on any errors.

This is the SMF message:

Database error: Illegal mix of collations for operation ' IN '
File: /www/htdocs/w0089d7e/at_site/smf/Sources/PrettyUrls-Filters.php
Line: 47

the line 47:

WHERE url_id IN (" . implode(', ', $urls_query) . ')', __FILE__, __LINE__);

Where cann i see the Apache-logs?

Lavarinth

#2361
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!
- - Lavarinth
http://www.campaigncreations.org [nofollow]

cassie

Found the error...

In the file ./Themes/default/languages/Modifications.english.php

The code got applied after the ending tag. All fine now!

Dannii

QuoteHow do i check that Dannii?
I already converted HTML entities to UTF-8 characters.
You'll have to check in phpMyAdmin. Also check the value of the global_character_set setting (in smf_settings)

Quote
This is the SMF message:

Database error: Illegal mix of collations for operation ' IN '
File: /www/htdocs/w0089d7e/at_site/smf/Sources/PrettyUrls-Filters.php
Line: 47

the line 47:

WHERE url_id IN (" . implode(', ', $urls_query) . ')', __FILE__, __LINE__);

Where cann i see the Apache-logs?
Hmm, that's very very strange! Check what encoding the pretty_urls_cache table is. Ask your host where to find the apache error log.

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"??
"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."

grevan

Hi Dannii,
i checked phpMyAdmin and i see under Collation tab -> utf8_general_ci.
i can´t find smf_settings, i see Settings.php, but can´t find global_character_set in there. I´m using SMF 1.1.6.
Thanks for any help.

Dannii

Did you check the individual tables, or just the database collation? Individual tables can have different collations.
"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."

grevan

Here´s a screenshot of an individual table:

mark7144

#2367
Two questions.

1) I changed the URL for a topic in the DB which worked fine and then did a 301 but it adds some pretty url stuff at the end of the URL which breaks the redirect.

Redirect 301 /talk/andy-murray-message-board/kim-sears-photos-info/ http://www.murraysworld.com/talk/andy-murray-message-board/kim-sears/

Result: "http://www.murraysworld.com/talk/andy-murray-message-board/kim-sears/?pretty;board=andy-murray-message-board;topic=kim-sears-photos-info.0"

2) How do I clear the smf_pretty_urls_cache table in phpMyadmin?

Dannii

grevan, you must have a smf_settings table, otherwise your forum wouldn't run!

mark, would something like this work?

Redirect 301 /talk/andy-murray-message-board/kim-sears-photos-info/ /talk/andy-murray-message-board/kim-sears/

You just click empty at the top.
"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."

fangweile

Hello there,

I installed the package and works great. However my custom gallery link won't work.

I only have this link

http://www.mysitehere.com/gallery/?pretty;board=gallery.0
It should be
http://www.mysitehere.com/gallery/


One more question, can I use this mod in my tinyportal page too?.

Dannii

The gallery is external to SMF? What happens if you change the link to having index.html or index.php?
And yes it works with TP.
"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."

fangweile

Alright I have figure it out. I just change the link to gallery/index.php .

How about in tinyportal. How do i change the link of an article to pretty url.

Thanks in advance

Dannii

You can install the extras package which includes a filter for TP. Make sure you're using 0.9 first.
"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."

fangweile

Yeah, I am using TP v0.9.8. Where is that extra package?. I am digging in this topic but still can't find anything about it.

Dannii

No, make sure you're using the 0.9 snapshot of this mod, and version 1.0.5 of TP. http://code.google.com/p/prettyurls/downloads/list
"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."

fangweile

So it won't work in my tp version.  Maybe I just wait for the next tp release beta 2.
Thanks a lot for your reply.

stanaca

Dannii emulation also did not worked for me. I wrote "SMF 2.0 Beta 3.1" in box and emulated. I tried both 0.9, and 0.8.4 version "but Apply Mod" is disabled.
...

Dannii

Try adding Public to the end. Like 2.0 Beta 3 Public or 2.0 Beta 4 Public
"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."

stanaca

Thank you Dannii, I added "SMF 2.0 Beta 3"  and emulated then it showed the "Apply Mod" option now i installed the 0.9 version
...

Dannii

No problems with specific files?
"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: