(Near) Perfect SEF for Bridged Joomla/SMF with OpenSEF

Started by SlammedDime, March 20, 2007, 04:19:23 AM

Previous topic - Next topic

aceat64

AirRideTalk you beat me to it, I was just about to post how commenting out the option line made things automagically work.  :D

Now I guess all that needs to be done is figure out a better way of generating the "return" value.

SlammedDime

Quote from: aceat64 on April 17, 2007, 04:38:49 AM
AirRideTalk you beat me to it, I was just about to post how commenting out the option line made things automagically work.  :D

Now I guess all that needs to be done is figure out a better way of generating the "return" value.
Check out my edited post above  8)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Benson

Good work!  :)

Two problems: If you have a space in a baord name, you can't browse it. E.g. i have a baord called "Testboard 1" - the url generated is /testboard-1, if i click on it i stay on the same page, even the url in the browser changes to the boards name...

Second one: if i want to login via orstio's smf-login-module, i get the joomla 404 error page (the requested url couldn't be found)...

cheers,
Benson

SlammedDime

#43
Quote from: Benson on April 17, 2007, 04:02:41 PM
Good work!  :)

Two problems: If you have a space in a baord name, you can't browse it. E.g. i have a baord called "Testboard 1" - the url generated is /testboard-1, if i click on it i stay on the same page, even the url in the browser changes to the boards name...

Second one: if i want to login via orstio's smf-login-module, i get the joomla 404 error page (the requested url couldn't be found)...

cheers,
Benson
Benson, the first issue is due to the way I coded the file to handle board pages.  Rather than suffixing the board name with something like Testboard-1-page-2, it is simply suffixed by a number, so /testboard-1 is going to look for a category or board named Testboard, and go to page 1 on it.  Of course, this won't lead you to the correct place as you found.  With that said, at this time, its not possible for board to end in numbers and use this sef_ext file unless you choose the simple url option.  Perhaps in the next version I can do some checking to test if a valid board is found before testing to see if the url has a page number in it.

Your second issue is resolved a few posts up.  The 'option' hidden form tag needs to be removed from mod_smf_login.php.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

RebeldeLatino

#44
Quote from: aceat64 on April 17, 2007, 04:13:07 AM
I've gotten it to (mostly) work, but I'm also experiencing the issue where users are unable to login. Any attempts to login send you to a page that says "We're sorry but the page you requested could not be found. Error 404". The URL in the address bar is shown as "http://teammaelstrom.com/forums/login2/ [nofollow]", but here's where it becomes weird. If you go to "http://teammaelstrom.com/forums/login2/ [nofollow]" without submitting a form (no POST data), it shows up perfectly fine! Now if you login from THAT page, it works....  >:(

Oh ya, and if you don't have the redirect for login/logout hard set to forums or front page, you get a nice error that reads:
QuoteThe page you are trying to access does not exist.
Please select a page from the main menu.
The URL is also weird, it's "http://teammaelstrom.com/component/option,com_/Itemid,0/&/ [nofollow]" but it does let you login and out!

I just recently figured out what I was doing wrong and got SEF to work on my server, I'd love to be able to use your great sef extension.

I also have exactly such problems.

I'm fixed the "/&" with Redirect in httaccess...

Update!

I am make changes in mod_smf_login.php, and the LOGIN break, in the Forum and Frontpage... redirect me to Frontpage, witout login :S

when i'm remove the <input type="hidden" name="option" value="com_smf" /> the module/mod_smf_login.php, can't login and redirect to homepage url. :(

¿Solution?
I can  FIXED, manipulating ".htaccess" ...  add:
Redirect /component/option,com_/Itemid,0/&/ http://www.YOUR-SERVER.com/YOUR-FORUM-ALIAS

Temporal solution: (Only for Joomla Module, break the forum logins :( )

Change in the "modules/mod_smf_login.php"

change
<form action="', sefReltoAbs($scripturl . 'action=login2'), '"
to
<form action="/(YOUR-FORUM-ALIAS)/index.php?action=login2"

aceat64

Ok, now everything works except the on logout the return URL is still messed up, it's an easy fix though, I used the same code that Matt posted for fixing the login redirect.

Near about line 255 change this:

if ($params->get('logout')=="2")
  $_SESSION['return'] = $mosConfig_sef=='1' ? sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING']) : $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING'];


To this:

if ($params->get('logout')=="2")
  $_SESSION['return'] = $mosConfig_sef=='1' ? ($_SERVER['QUERY_STRING'] != '' ? sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING']): $mosConfig_live_site) : $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING'];


That should be the last tweak (for now) that needs to be done, everything else looks like it's working without issue now.  :D

RebeldeLatino

aceat64 in modules/mod_smf_login.php ?




My problem is caused by a conflict alias of OpenSEF and my site.

The fix's work fine. Thanks!

aceat64

Quote from: RebeldeLatino on April 18, 2007, 01:12:52 AM
aceat64 in modules/mod_smf_login.php ?




My problem is caused by a conflict alias of OpenSEF and my site.

The fix's work fine. Thanks!

Yes, in modules/mod_smf_login.php, sorry for the confusion.

SlammedDime

Ok, I'll update to version 1.5 now.  Support was added for those that have numeric suffixes on board names, like Forum 362, or Board 3, etc, etc.  In version 1.4.5 and below, 362 or 3 in the previous examples were treated as page numbers.  Now the extension checks to see if they are valid board names first, and if not then treats the numbers as page numbers.

Also changed is the readme file to reflect changes needed to mod_smf_login.php.  Unless Orstio points out why the corrections outlined here are bad in the long run, I see the need to do them to prevent 404 errors and allow proper redirection upon login and logout.

aceat64 - there is one more change needed around line 332 that you can probably figure out without looking at the readme (same change as what you pointed out above as well).  I tested these three changes to my virgin install of these softwares/components and everything seems to work as advertised and well.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

RebeldeLatino

#49
Matt @ ARTcom:

Very thanks from Latin américa and Argentina. :D

It would be good that rename the zip to "JSMF_sef_ext_v1.5.0.zip".


SlammedDime

Quote from: RebeldeLatino on April 18, 2007, 03:23:36 PM
Matt @ ARTcom:

Very thanks from Latin américa and Argentina. :D

It would be good that rename the zip for "JSMF_sef_ext_v1.5.0.zip".

Thank you for that last find.  Not sure what you mean by the first comment.  To fix the database backup issue, open up version 1.5.1 (now in the first post) and replace your sef_fix.php file with the one in the zip file and you should be good to go.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

thinkarcade

Not sure if I found another error or not but can anyone else use the collapsible feature on the forum categories?

RebeldeLatino

#52
Other error:

  • In e-mail notifaction of new users registered, the message it is cut!!

    "newuser ha firmado como nuevo usuario del foro. Haz <i>clic</i> en el enlace para ver su perfil.


    /(ForumAlias)/profil"

  • When install a SMF package:

    Gerenate this url: "http://server.com/(forum_alias)/packages/install/package/(nameofpackage).tar.gz/ [nofollow]"

    message error: "The subject or forum that you are looking for seems that it does not exist, or outside your limits."

SlammedDime

Quote from: thinkarcade on April 19, 2007, 11:37:17 PM
Not sure if I found another error or not but can anyone else use the collapsible feature on the forum categories?
haha... [holds gun to own head]... damn sub actions.... add "collapse" and "expand" to the custom subaction array and see what happens... arggggggggggg

And again, I really really really do appreciate you guys helping with this and finding bugs.  At least they are small things that don't crash the forum...

RebeldeLatino... I realize your first issue.  I still have yet to find a way to correct it.  It is because of the issues with the way email messages are parsed by the bridge component and sef urls generated.  It should happen without this extension as well.  I will look over the weekend more indepth at the code for the bridge and see if I can figure out why (or maybe orstio can help?).

For your second issue..... I can't replicate it.  What package are you trying to install?  I have tried uploading and installing zip, tgz, and tar.gz files and all have uploaded and installed without issue.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

adamdidthis

#54
OK I have made all of the changes you specifiy in the readme but everything works except the forum. when i open a thread for the forum it does not form the url correctly and it looks like http://www.mlmotorsport.com/Item.....etc so none of the forum can be read.

any ideas?

And I am using SMF 1.1.2, bridge 1.1.7, OpenSEF 2.0.0-RC5_SP2 and joomla 1.0.12

SlammedDime

Quote from: adamdidthis on April 20, 2007, 08:02:45 AM
OK I have made all of the changes you specifiy in the readme but everything works except the forum. when i open a thread for the forum it does not form the url correctly and it looks like http://www.mlmotorsport.com/Item.....etc so none of the forum can be read.

any ideas?

And I am using SMF 1.1.2, bridge 1.1.7, OpenSEF 2.0.0-RC5_SP2 and joomla 1.0.12
What is the alias you have setup in OpenSEF for your forum component?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     


adamdidthis

OK upgraded to the latest version of your extension and it now uses the alias, but when you click on a board it takes you to the first thread instead of the board index.

SlammedDime

Quote from: adamdidthis on April 23, 2007, 02:18:49 AM
OK upgraded to the latest version of your extension and it now uses the alias, but when you click on a board it takes you to the first thread instead of the board index.
Got a link I can see?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

adamdidthis

yep the link is here:

http://www.mlmotorsport.com/ml_forum

I have to be carefull as the forum is live so I cant leave it like that for long.

Advertisement: