[osCommerce] With $messageStack doesn't rewrite

Magic SEO URLs for CRE Loaded.
inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [osCommerce] With $messageStack doesn't rewrite

Postby inveo » Fri May 11, 2012 8:57 am

Yes or no there is not much we can do - Magic SEO URLs do not use, modify or change internal osCommerce API so it is on Modular SEO Header Tags developers to fix their bugs.

rikic
Posts: 18
Joined: Sat Jul 02, 2011 4:27 am

Re: [osCommerce] With $messageStack doesn't rewrite

Postby rikic » Fri May 11, 2012 12:44 pm

keeping on investigating by myself, I've got this idea:
when come this lines

Code: Select all

if ($error == true) {
$messageStack->add('login', TEXT_LOGIN_ERROR);


and goes to http://www.detectalia-italia.it/login.p ... on=process

(for example in the login.php file) seems that it cannot redraw the form 'login', as it is that cannot rewrite the file login.php with the action=proccess as an .html page.
in fact the same error used to appear with non_seo pages before I added the new rules to the .htaccess file and to html_output.php file.

do yo have any idea about it? is it possibile to rewrite action=process?

thank you very much for your patience..... :oops:

rikic
Posts: 18
Joined: Sat Jul 02, 2011 4:27 am

Re: [osCommerce] With $messageStack doesn't rewrite

Postby rikic » Sat May 12, 2012 4:05 am

hi!
I've definitively understood that the problem is in login.php file.
when

Code: Select all

  if ($error == true) {
    $messageStack->add('login', TEXT_LOGIN_ERROR);

and then

Code: Select all

<?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true); ?>

it cannot rewrite FILENAME_LOGIN as a html page and it doesn't reconize the language.
any idea please?
thank you
riccardo

inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [osCommerce] With $messageStack doesn't rewrite

Postby inveo » Sat May 12, 2012 6:43 am

That URLs is not transformed to SEO format to avoid any conflicts with other modules. The problem you are getting does not come from not rewritten URLs.

rikic
Posts: 18
Joined: Sat Jul 02, 2011 4:27 am

Re: [osCommerce] With $messageStack doesn't rewrite

Postby rikic » Sat May 12, 2012 8:55 am

if not, why in the .htaccess appears this rewriting rules?

Code: Select all

#login.php - login
RewriteRule ^([a-z]{2})/account/login\.html$ login.php?language=$1 [L,QSA]


It seems that rewrites the login.php Url.... ;)

inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [osCommerce] With $messageStack doesn't rewrite

Postby inveo » Sat May 12, 2012 9:01 am

Login page, with no query string, is rewritten (replaced in HTML source code) but this is not the case.

rikic
Posts: 18
Joined: Sat Jul 02, 2011 4:27 am

Re: [osCommerce] With $messageStack doesn't rewrite

Postby rikic » Sat May 12, 2012 10:26 am

ah ok.
and is not possible to somehow rewrite the query string?

inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [osCommerce] With $messageStack doesn't rewrite

Postby inveo » Sat May 12, 2012 10:36 am

For Magic SEO URLs it is easy job but it is not rewritten intentionally. Your problem does not come from not rewritten URLs and only Modular SEO Header Tag developers can fix it.

rikic
Posts: 18
Joined: Sat Jul 02, 2011 4:27 am

Re: [osCommerce] With $messageStack doesn't rewrite

Postby rikic » Sat May 12, 2012 11:07 am

keeping on investigating....
I've renamed the login.php as login_seo.php and I've change the .htaccess rewriting rule.
of course I've also changed the login.php like this
addded:

Code: Select all

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN_SEO);

and changed:

Code: Select all

<?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true); ?>

to

Code: Select all

<?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN_SEO, 'action=process', 'SSL'), 'post', '', true); ?>.

I added the new file in includes/filenames. php and I added the login_seo.php in includes/language/italian (or whatever language is set up).
I've also changed the html_output.php file adding:

Code: Select all

$customepages_non_seo[25] = "login_seo.php" ;

and

Code: Select all

$customepages_yes_seo[25] = "login.html" ;

as written this forum.
and.... IT WORKS!!
check it here if you want:
http://www.detectalia-italia.it/it/logi ... on=process
so think that the problem is due to the rewrite rules of login.php....
what you think? I know that isn't an elegant solution, maybe this cuold help you to find a more "elegant" one than mine... :roll:

inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [osCommerce] With $messageStack doesn't rewrite

Postby inveo » Sat May 12, 2012 11:19 am

it is great to see you found a fix for this. However, we are afraid we are not able to find a better solution for you since no of referenced files are created or edited when running Magic SEO URLs.