Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

More white pages


Oceanwatcher

Recommended Posts

I have had a little problem with the languages.

 

First of all - OsCommerce got installed fine and we started entering products into the catalog.

 

Aftre a while, we decided to remove the extra languages because the only language user will be Norwegian. Norwegian was already set as default language and deleting Spansish and German was not a problem. I did not get any extra warning about deleting English.

 

After I deleted the two first languages, everything seemed fine, but after deleting English, everything in the catalog seemed to be gone. I can still see it from the frontpage of the store, but in the backend, it has disappeared.

 

Additionally, after logging out of the shop, I am only getting a white page instead of the login.

 

Through phpMySQL, I was able to add back the info about English language in the database and gave it ID1.This gives me back the UK flag on the frontpage of the site, but still no login.

 

I then tried going into the list of cookies in Firefox to delete the cookie for the website and that got the login back!

 

But the categories and products are still gone. I checked the database and it looks like all is there, it is just not displaying correct. What is the link here to get back everything? All I did was delete English language with Norwegian set as default language.

 

When I try to set the adminlogin to Norwegian, I still get a white page and have to delete the site cookie again. Why do OsCommerce produce white pages instead of something more meaningful? I really want to get rid of English language so there is only one language to fill in for each product and option.

 

If you have any information at all, please do not hesitate to add it to this thread. Everything is appreciated!

 

OsC v. 2.2 rc1 installed on webhotel. All installation done by the book and it has worked fine except for the occacional white page.

Regards,

 

Oceanwatcher

Blog: http://www.wisnaes.com/

Pictures: http://www.oceanwatcher.com/

Software tips (in Norwegian): http://www.datahverdag.com/

Link to comment
Share on other sites

In the frontend ( http://www.golflab.no/catalog/ ) I get a full list of categories as long as I am using Norwegian language. But when I switch to English, the category list disappears.

 

I then check the category_description table in the database, and it only contains entries that refer to the Norwegian names and language ID.

 

Can it be that OsCommerce deletes all references that is connected to a certain language when you delete that specific language? If so, it should be possible to enter it all again if I could only get Norwegian to work in the backend. The white page on login is annoying... Seem to be a lot of this going around. Anyone got any solution to white pages?

Regards,

 

Oceanwatcher

Blog: http://www.wisnaes.com/

Pictures: http://www.oceanwatcher.com/

Software tips (in Norwegian): http://www.datahverdag.com/

Link to comment
Share on other sites

So...

 

Either I have asked a very obvious thing, and I am beeing punished for not knowing the answer (it can sometimes be hard to find the right search words when your first language is not English..) or I have hit something that nobody really know anything about. The silent treatment is not a good thing...

 

Either way, I feel a bit stupid talking to myself here and wish anyone that know a bit about this would chime in with a little help.

 

Can it be that this white page behaviour of OSC is a serious bug and nobody wants to talk about it in fear of having the whole program dumped by the majority of users? Can it be that it is so unstable that it puts out white pages if you do anything out of the ordinary?

 

If you are a new user or old user and have seen this happen, please put a message here with what you did to provoke those white pages. I have used many different systems based on php and mySQL and never had any problems with white pages.

Regards,

 

Oceanwatcher

Blog: http://www.wisnaes.com/

Pictures: http://www.oceanwatcher.com/

Software tips (in Norwegian): http://www.datahverdag.com/

Link to comment
Share on other sites

Can it be that OsCommerce deletes all references that is connected to a certain language when you delete that specific language?

Yes, from admin/languages.php:

	  case 'deleteconfirm':
	$lID = tep_db_prepare_input($HTTP_GET_VARS['lID']);

	$lng_query = tep_db_query("select languages_id from " . TABLE_LANGUAGES . " where code = '" . DEFAULT_CURRENCY . "'");
	$lng = tep_db_fetch_array($lng_query);
	if ($lng['languages_id'] == $lID) {
	  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '' where configuration_key = 'DEFAULT_CURRENCY'");
	}

	tep_db_query("delete from " . TABLE_CATEGORIES_DESCRIPTION . " where language_id = '" . (int)$lID . "'");
	tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . (int)$lID . "'");
	tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$lID . "'");
	tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where language_id = '" . (int)$lID . "'");
	tep_db_query("delete from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$lID . "'");
	tep_db_query("delete from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$lID . "'");
	tep_db_query("delete from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$lID . "'");

Perhaps things return to normal when you edit the Configuration key DEFAULT_LANGUAGE (configuration_group_id 6) to no.

In RC1 you can choose it from the drop-down when you enter the admin (top right corner).

Link to comment
Share on other sites

I have had a little problem with the languages.

 

First of all - OsCommerce got installed fine and we started entering products into the catalog.

 

Aftre a while, we decided to remove the extra languages because the only language user will be Norwegian. Norwegian was already set as default language and deleting Spansish and German was not a problem. I did not get any extra warning about deleting English.

 

After I deleted the two first languages, everything seemed fine, but after deleting English, everything in the catalog seemed to be gone. I can still see it from the frontpage of the store, but in the backend, it has disappeared.

 

Additionally, after logging out of the shop, I am only getting a white page instead of the login.

 

Through phpMySQL, I was able to add back the info about English language in the database and gave it ID1.This gives me back the UK flag on the frontpage of the site, but still no login.

 

I then tried going into the list of cookies in Firefox to delete the cookie for the website and that got the login back!

 

But the categories and products are still gone. I checked the database and it looks like all is there, it is just not displaying correct. What is the link here to get back everything? All I did was delete English language with Norwegian set as default language.

 

When I try to set the adminlogin to Norwegian, I still get a white page and have to delete the site cookie again.

 

osC uses the same session parameter for the language both in the frontend and the admin. If you use English in the backend but not in the frontend this indeed becomes an issue.

 

I think (haven't experimented with this ad nauseam) that removing the session stuff for languages in the backend and hardcoding it might solve the problem. Look in admin/includes/application_top.php around line 110 and change it to the following:

// set the language
/*  if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
if (!tep_session_is_registered('language')) {
  tep_session_register('language');
  tep_session_register('languages_id');
} */

include(DIR_WS_CLASSES . 'language.php');
$lng = new language();

$lng->set_language('en'); // language_id for english hard-coded

/*	if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
  $lng->set_language($HTTP_GET_VARS['language']);
} else {
  $lng->get_browser_language();
} */

$language = $lng->language['directory'];
$languages_id = $lng->language['id'];
//  }

Notice the last } is commented out!

Link to comment
Share on other sites

Thank you for your answer, Jan. I will work on that part a little later.

 

I first thought I would install the whole thing on a domain I use to test things. After installing and looking a bit more on the filestructure, I added Norwegian language. I tried logging on in Norwegian and got the same white page. And scratching my head a bit...

 

Then I got a hunch. In the Admin/includes/languages there is a folder called norwegian. But no norwegian.php . So I did a small test. Renamed the english.php from the install package and uploaded it there. Success! Not in Norwegian, of course, but the page displays and the categories are there. So I am going to do the same to the live site and add all English descriptions back. That should in theory get me back to start at least :-)

 

I will contact the Norwegian translator and tell them about the problem.

Regards,

 

Oceanwatcher

Blog: http://www.wisnaes.com/

Pictures: http://www.oceanwatcher.com/

Software tips (in Norwegian): http://www.datahverdag.com/

Link to comment
Share on other sites

I will contact the Norwegian translator and tell them about the problem.

I recall a posting about the admin translation in Norwegian and the poster replied back later that he did the translation himself. Might be worthwhile to search the forum for it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...