Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 1:56 pm (All times are UTC )

 




Post new topic Reply to topic  [ 166 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
Posted: Tue Nov 15, 2005 4:23 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 24, 2005 2:02 pm
Posts: 276
Location: Rhode Island, USA
Many thanks for setting up the hack predator and ken.

This might be a moot point as you're that much closer to a 1.1 release, and moreover I'm not up to speed with all those string manipulation functions involved with the hack to call this a bug, but in the 1.0.3 revision 2, multiple wrapper URL menu items in a site to different URLs all resolve to http://mysite.com/wrapper/, and appear to default to the wrapped URL with the 'lowest' menu ItemID.

Line 1023-4 of sef.php currently looks like this:

Code:
} else if (eregi("option=com_wrapper",$string)) {
               $string = $mosConfig_sef_components."/".$mosConfig_sef_wrapper."/";


Here's a potential fix for making the pretty URLs at least: replace the lines above with the following:

Code:
} else if (eregi("option=com_wrapper",$string)) {
                    $temp = split("&Itemid=", $string);
               $temp = split("&", $temp[1]);
               $database->setQuery("SELECT name FROM #__menu WHERE id=".$temp[0]);
               $sefstring .= sefencode($database->loadResult())."/";
               $string = $mosConfig_sef_components."/".$mosConfig_sef_wrapper."/".$sefstring;


Though I'm definitely missing something here: picking up the wrapper's ItemID...I look down a little bit and I see that long getID function.  Any thoughts?


Last edited by pointri on Thu Dec 01, 2005 9:18 pm, edited 1 time in total.

Top
   
 
Posted: Thu Nov 17, 2005 10:41 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Mon Sep 05, 2005 7:58 pm
Posts: 3
Marko, Great job on CoreSEF.
Not sure if this is a known bug, but it appears that the "Remove Characters:" code is not currently working.
It appears that this may be due to sefencode and sefdecode. The issue first seems to pop up on
Code:
foreach (array($mosConfig_sef_url_exception) as $value) {

Where the array isn't built as intended.
I'm also not sure if
Code:
ereg_replace(urlencode($value), $value, $string);
is intentional, as this would replace $value with $value.

Let me know if I'm missing something here, or if this is a known problem.


Top
   
 
Posted: Mon Nov 21, 2005 4:03 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Sep 02, 2005 4:19 pm
Posts: 70
I'm running into the same wrapper problem. I have three wrappers leading to different html forms. The wrapper menu buttons all resolve to the same form when the Advanced SEF urls are on.  Plus the remove characters and the short and long url option, don't seem to work correctly for me either, it alwasy uses the title and not the title alias.


Top
  E-mail  
 
Posted: Mon Nov 21, 2005 4:10 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 2:23 pm
Posts: 170
Predator,

Will this still work with 1.0.4? And if so will it compromise security as I see there was a potential problem with the default sef?

Cheers  :)

_________________
Dell Special Offers, Cheapest Deals and Evalue Codes
Discount Voucher Codes


Top
  E-mail  
 
Posted: Mon Nov 21, 2005 4:15 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 24, 2005 2:02 pm
Posts: 276
Location: Rhode Island, USA
Just upgraded to 1.0.4 on one of my low-risk, low-traffic sites.  Looks like it caused the hack not to pick up a couple of its parameters.

- SEF Mode
- Length of URLs
- Lower-Case All URLs
- Home menu URL


Top
   
 
Posted: Mon Nov 21, 2005 5:43 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Wed Aug 17, 2005 10:12 pm
Posts: 1686
Location: Germany-Bad Abbach
pointri wrote:
Just upgraded to 1.0.4 on one of my low-risk, low-traffic sites.  Looks like it caused the hack not to pick up a couple of its parameters.

- SEF Mode
- Length of URLs
- Lower-Case All URLs
- Home menu URL


An updated Version is here:

http://developer.joomla.org/sf/frs/do/v ... a_1_0_4_r1

_________________
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D


Top
   
 
Posted: Mon Nov 21, 2005 5:49 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 2:23 pm
Posts: 170
Thanks Predator! You da man! ;D

_________________
Dell Special Offers, Cheapest Deals and Evalue Codes
Discount Voucher Codes


Top
  E-mail  
 
Posted: Mon Nov 21, 2005 6:10 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 24, 2005 2:02 pm
Posts: 276
Location: Rhode Island, USA
Ah, another two-minute upgrade?  Just overwrote and it's working great now.  Thanks!


Top
   
 
Posted: Mon Nov 21, 2005 6:47 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Wed Aug 17, 2005 10:12 pm
Posts: 1686
Location: Germany-Bad Abbach
marlyred wrote:
Predator,

Will this still work with 1.0.4? And if so will it compromise security as I see there was a potential problem with the default sef?

Cheers  :)


This potential problem is also fixed in the CoreSEF hack. The next 2 weeks i have a lot of time so will fix also the other issues.

_________________
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D


Top
   
 
Posted: Wed Nov 23, 2005 11:45 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Sep 05, 2005 11:21 am
Posts: 337
Location: Nis, Serbia
Can you make Future Request tracker on Forge?

_________________
http://www.pcigre.com -> game community


Top
   
 
Posted: Thu Nov 24, 2005 12:01 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Wed Aug 17, 2005 10:12 pm
Posts: 1686
Location: Germany-Bad Abbach
Feature Request Tracker is added ;)

_________________
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D


Top
   
 
Posted: Thu Nov 24, 2005 2:12 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Aug 18, 2005 9:02 pm
Posts: 20
Location: Country of FREEDOM
Hi.
Thank you for this work - i very like it, but there is one issue - i'm using as a frontpage Static Content - so i got a lot of troubles with Home-menu link - it takes me to the last of the added content items if i clik on Home-menulink - so i think it will be whery good if you add the option to use the Static content as a frontpage in your hack.
Thanks!

_________________
Jewish Wedding


Top
   
 
Posted: Thu Nov 24, 2005 2:25 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 21, 2005 11:39 pm
Posts: 30
Have 2 questions:

1. Is the problem with joomlaboard solved? If so, please tell me how, as I`m still experiencing problems : when I want to open a new topic or post a reply I get an almost blank page - just site template and forum navigation. Plus, that problem with Invalid ID.

2. My site/language is using such characters as č, ć, š, and ž. And if I don`t exclude `em from URL I get URLs with "%e8" instead of "č" and similar. If I exclude`em my URLs are not so descriptive/correct (i.e. like if joomla would be jooma in URL). I hope you know what I mean.

My question: Is there a way I can replace "č" and "ć" with "c", "š" with "s" and "ž" with "z"?

Thanks,
Vukan

_________________
elogodesign.com | ddir.org


Top
  E-mail  
 
Posted: Thu Nov 24, 2005 9:18 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Wed Aug 17, 2005 10:12 pm
Posts: 1686
Location: Germany-Bad Abbach
vukan wrote:
Have 2 questions:

1. Is the problem with joomlaboard solved? If so, please tell me how, as I`m still experiencing problems : when I want to open a new topic or post a reply I get an almost blank page - just site template and forum navigation. Plus, that problem with Invalid ID.

2. My site/language is using such characters as č, ć, š, and ž. And if I don`t exclude `em from URL I get URLs with "%e8" instead of "č" and similar. If I exclude`em my URLs are not so descriptive/correct (i.e. like if joomla would be jooma in URL). I hope you know what I mean.

My question: Is there a way I can replace "č" and "ć" with "c", "š" with "s" and "ž" with "z"?


Vukan



On the top of the sef.php you see:

// specify the special chars for replace but need a better place for this
$url_replace = array(
"�" => "ae",
"�" => "aa"
);

and replace it with:

// specify the special chars for replace but need a better place for this
$url_replace = array(
"č" => "c",
"ć" => "c",
"š" => "s",
"ž" => "z"
);

_________________
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D


Top
   
 
Posted: Thu Nov 24, 2005 9:59 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 21, 2005 11:39 pm
Posts: 30
Strange ...
Some URLs work some don`t.
Check my site: http://www.zalogaj.com/

I.e.:
http://www.zalogaj.com/razno/razno/o-hrani-uopste.htm (works)
http://www.zalogaj.com/recepti/glavna-j ... jivama.htm (doesn`t work)
And both has the same character replaced - "š" => "s",


Note: Didn`t replaced all - I just replaced "š" => "s" and "ž" => "z"

_________________
elogodesign.com | ddir.org


Top
  E-mail  
 
Posted: Thu Nov 24, 2005 10:23 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Wed Aug 17, 2005 10:12 pm
Posts: 1686
Location: Germany-Bad Abbach
vukan wrote:
Strange ...
Some URLs work some don`t.
Check my site: http://www.zalogaj.com/

I.e.:
http://www.zalogaj.com/razno/razno/o-hrani-uopste.htm (works)
http://www.zalogaj.com/recepti/glavna-j ... jivama.htm (doesn`t work)
And both has the same character replaced - "š" => "s",


Note: Didn`t replaced all - I just replaced "š" => "s" and "ž" => "z"


Hmm strange will check this deeper

_________________
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D


Top
   
 
Posted: Thu Nov 24, 2005 10:48 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 07, 2005 9:37 pm
Posts: 12
Predator wrote:
vukan wrote:
Strange ...
Some URLs work some don`t.
Check my site: http://www.zalogaj.com/

I.e.:
http://www.zalogaj.com/razno/razno/o-hrani-uopste.htm (works)
http://www.zalogaj.com/recepti/glavna-j ... jivama.htm (doesn`t work)
And both has the same character replaced - "š" => "s",


Note: Didn`t replaced all - I just replaced "š" => "s" and "ž" => "z"


Hmm strange will check this deeper


Hi,

i also had the effekt with the german special characters,
i replaced ß with ss  and i hat a URL where ss was in the normal Text
so the backreplace took place an kaboom the link won't work.

perhaps this helps a litte

greets

Roberto


Top
  E-mail  
 
Posted: Thu Nov 24, 2005 10:53 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 21, 2005 11:39 pm
Posts: 30
Roberto,
Didn`t understand. Could you please clarify?

Some URLs without these characters at all - doesn`t work also(!) i.e. http://www.zalogaj.com/recepti/salate/s ... ompira.htm
Please help asap!

Thanks,
Vukan

_________________
elogodesign.com | ddir.org


Top
  E-mail  
 
Posted: Fri Nov 25, 2005 12:21 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 21, 2005 11:39 pm
Posts: 30
Anybody?

_________________
elogodesign.com | ddir.org


Top
  E-mail  
 
Posted: Fri Nov 25, 2005 9:45 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 07, 2005 9:37 pm
Posts: 12
vukan wrote:
Roberto,
Didn`t understand. Could you please clarify?

Some URLs without these characters at all - doesn`t work also(!) i.e. http://www.zalogaj.com/recepti/salate/s ... ompira.htm
Please help asap!

Thanks,
Vukan


Hello Vukan,
is was late yesterday and ist was a "go to bed post" :) 

my answer were ment as a hint to the developer for finding your issue.

Im sorry i havn't the solution persent, but i try to clarify my assumption:

The replace Funktion works in 2 Ways, first articlename -> Url and the second Url-> find Article.
The First makes every  "š" => "s" and the second  every!!!  "s" => "š"


1st foreach ($url_replace as $key => $value) {
$string = ereg_replace($key, $value, $string);
}
2nd foreach ($url_replace as $key => $value) {
$string = ereg_replace($value, $key, $string);
}
the only Problem is, when the name is "monster" the 1st doesn't anything bit the 2nd makes "monšter" of it,
this is not a valid articlename an then the corehack goes to the fedined error page (in your case the frontpage)

--> Try to replace with multiple characters i.e. "š" => "sz" or somthing like that (a kombination that isn't in normal words!)
then try again.
This would be easier to track if the system had a debug mode where it says  Blog "monšter" not found in Database or something like that.

:P puh i hope this makes things clearer

greetings Roberto


Top
  E-mail  
 
Posted: Fri Nov 25, 2005 11:13 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 21, 2005 11:39 pm
Posts: 30
Hi Roberto,

Got it now  ;) Thanks.
But if that`s how this script works, I guess it would be simpler just to exclude those characters in Global Config.

I`ll probably have to rewrite these coresef files, because my simpleboard doesn`t work + this stuff with characters :(

_________________
elogodesign.com | ddir.org


Top
  E-mail  
 
Posted: Fri Nov 25, 2005 11:48 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Wed Aug 17, 2005 10:12 pm
Posts: 1686
Location: Germany-Bad Abbach
vukan wrote:
Hi Roberto,

Got it now  ;) Thanks.
But if that`s how this script works, I guess it would be simpler just to exclude those characters in Global Config.

I`ll probably have to rewrite these coresef files, because my simpleboard doesn`t work + this stuff with characters :(


Helping fixing is everytime welcome :D

_________________
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D


Top
   
 
Posted: Mon Nov 28, 2005 10:05 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Nov 15, 2005 11:45 am
Posts: 45
I think I may have fixed an error with the pagination.

At the moment there are problems with the pagination on all sets of pages, items, blogsection, blogcategory and frontpage.

This fixes the pagination for items only

On line 877 in sef.php of coresef hack

Change this line:

  $sefstring .= "/".$temp[0]."/";

to this line:

  $sefstring .= $temp[0]."/";


Seems to work well and no other conflicts.

I would really like to get blogsection and blogcategory fixed, these are only showing one number /9/ in the URL when i believe it should be two /1/9/

Would be grateful for some help in fixing these issues

:)


Top
  E-mail  
 
Posted: Mon Nov 28, 2005 9:58 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 07, 2005 9:37 pm
Posts: 12
soodejuu wrote:
.......

Secondly, although in the backend at "Remove Characters:" it says  §,$,%,£,@,?,#,&,(,),+,*,!,;,:
At least the "!" aa title like " Volgende halte: Praag?! " ends up looking like http://eurodusnie.nl/Dusnieuws_archief/ ... 3F%21.html 
with .../$mosConfig_live_site as a result.

Any suggestions on how to fix this would be highly apreciated


Hi, i did a hack which could be the base for further discussion on how to solve the "Remove Characters" issue


In the Backend insert !|$|,    as Remove Characters

in 1154 $string = eregi_replace("\+", $mosConfig_sef_space, $string);
//ROBI Remove Characters HACK 1
foreach (explode("|",$mosConfig_sef_url_exception) as $value) {
$string = str_replace(urlencode($value), "", $string);
}
//ROBI Remove Characters HACK 1 END

in 613 $content_name = sefdecode($url_array[$pos+2]);

// ROBI Remove Characters HACK 2
if ($sef_longurl=="name") {
$database->setQuery("SELECT id "
."FROM #__content "
."WHERE REPLACE( REPLACE( REPLACE(title ,',', '') ,'$', '')  ,'!', '')='$content_name'");
//  Potential Characters  §|!|$|%|£|@|?|#|&|(|)|+|*|/|,
//ROBI Remove Characters HACK 2 END

HACK 1:
i replaced the separator by a "|" Symbol because i use the "," in my texts.
the old replace Function replaces not the defined characters on my system - heres a new one.

to get things work again we need HACK 2:
The search on the database needs to replace these characters too.
Here is a very dirty , limited sql modification.


___
Instead of putting the task of removing the characters in the hands of the database
all results could be first replaced an then compared, this would ease the implementation
but i think this isn't efficient. On the other hand the sef needs a cache to be efficient
an then some millis aren't the problem.

Let the Discussion begin

greetings Roberto


Top
  E-mail  
 
Posted: Mon Nov 28, 2005 10:02 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 07, 2005 9:37 pm
Posts: 12
Hello again,

i worte these simple lines for easier debugging,
in the case the sef didn't find a url it doesn't redirect but puts some infos on the screen.
Especially when you play around with the replace or remove features i think this is useful.  :'(

Greetings Roberto

in 710 mosRedirect($mosConfig_sef_404);
//mosRedirect($mosConfig_sef_404);
// ROBI HACK Debug
echo "NOT FOUND: ".$REQUEST_URI."
";print_r($uri);
//ROBI HACK Debug END


Top
  E-mail  
 
Posted: Mon Nov 28, 2005 10:29 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 07, 2005 9:37 pm
Posts: 12
Hello,
here the third in line  :)
For Sites that use installations in subfolders use this hack

after 198 $url_array = explode("/", $_SERVER['REQUEST_URI']);

//ROBI HACK
$depth=substr_count(str_replace("http://", "",$mosConfig_live_site) , "/");
$url_array = array_slice ($url_array, $depth);
//ROBI HACK END

Greetings Roberto


Top
  E-mail  
 
Posted: Wed Nov 30, 2005 9:53 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 2:23 pm
Posts: 170
Hi, I am having a problem with the coresef hack.

When I have un-published some old content on my joomla site, and someone clicks on a link to it from a search, on google for example, they are faced with a message that they are 'Not authorized to view this resource, blah blah'.

I would like them instead to be directed to the page I specified (my site's sitemap) for 404 errors in the sef configuration page in the admin panel.

Can anyone help with this please?

_________________
Dell Special Offers, Cheapest Deals and Evalue Codes
Discount Voucher Codes


Top
  E-mail  
 
Posted: Thu Dec 01, 2005 5:00 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Dec 01, 2005 4:59 am
Posts: 46
Any luck getting this to work with SMF yet?

_________________
Home Inspector Pro Home Inspection Software
Goosemoose Pet Forums - http://www.Goosemoose.com


Top
   
 
Posted: Thu Dec 01, 2005 9:13 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Nov 15, 2005 11:45 am
Posts: 45
Hi Marko

Please come back to this thread :) We need U

I am happy to help out if you can show me which bits of code are in the problematic areas we talk about

Are you going to continue this hack seeing as you released sefbot as well and its installable?

Any help is much appreciated  ;D


Top
  E-mail  
 
Posted: Thu Dec 01, 2005 10:28 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 07, 2005 9:37 pm
Posts: 12
marlyred wrote:
Hi, I am having a problem with the coresef hack.

When I have un-published some old content on my joomla site, and someone clicks on a link to it from a search, on google for example, they are faced with a message that they are 'Not authorized to view this resource, blah blah'.

I would like them instead to be directed to the page I specified (my site's sitemap) for 404 errors in the sef configuration page in the admin panel.

Can anyone help with this please?


Hi,

i think this isn't really a coresef problem because you have the same effekt without sef.
In my opinion it's easier to patch yoomla at the code where it writes the "not authorized" message.

Go to procomPortal/components/com_content/content.php line 1109  add   echo "Redirect!";
so you can test if there are no Sideeffekts (This ist the Else block wenn the Article istn't published or the publish Date is over.
If there are no Sideeffekts you can Do your 404 Redirect there. (You could use the $mosConfig_sef_404 from CoreSEF hack, because its Parameters are in the normal configuration.php)

I hope i could help a litte

Roberto


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 166 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

Quick reply

 



Who is online

Users browsing this forum: njoya and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group