Service Unavailable When Submitting The Message

After I submit a post to customer from order detail page (communication) i get Service unavailable message.

After refreshing the page i check and see that the message was sent but not sure why i get this message.

Anyone knows why?



thanks,

01.jpg

[quote name='UrKo' timestamp='1408941392' post='190533']

After I submit a post to customer from order detail page (communication) i get Service unavailable message.

After refreshing the page i check and see that the message was sent but not sure why i get this message.

Anyone knows why?



thanks,

[/quote]



Uncomment the following line in the config.php file and try again



//define('DEVELOPMENT', true);




The error message should be displayed to you.

I get this:



Message
Column 'lang_code' cannot be null (1048)
INSERT INTO cscart_seo_names (`name`, `type`, `object_id`, `dispatch`, `lang_code`, `path`, `company_id`) VALUES ('orders-details', 's', 0, 'orders.details', NULL, '', 1) ON DUPLICATE KEY UPDATE `name` = 'orders-details', `type` = 's', `object_id` = 0, `dispatch` = 'orders.details', `lang_code` = NULL, `path` = '', `company_id` = 1
Error at
app/Tygh/Database.php, line: 646
Backtrace
File: app/Tygh/Database.php
Line: 331
Function: _error
File: app/functions/fn.database.php
Line: 130
Function: query
File: app/addons/seo/func.php
Line: 206
Function: db_query
File: app/addons/seo/func.php
Line: 824
Function: fn_create_seo_name
File: app/addons/seo/func.php
Line: 1132
Function: fn_seo_get_name
File: app/functions/fn.control.php
Line: 94
Function: fn_seo_url_post
File: app/functions/fn.common.php
Line: 3226
Function: fn_set_hook
File: app/addons/discussion/controllers/common/discussion.php
Line: 125
Function: fn_url
File: app/functions/fn.control.php
Line: 608
Function: include
File: app/functions/fn.control.php
Line: 391
Function: fn_run_controller
File: admin......php
Line: 27
Function: fn_dispatch

To fix it please open app/addons/discussion/controllers/common/discussion.php and replace:



'url' => fn_url("orders.details?order_id=$object[object_id]", 'C', 'http', null, true),




with



'url' => fn_url("orders.details?order_id=$object[object_id]", 'C', 'http', $order_info['lang_code'], true),

perfect. thanks :)



btw, do you know where the messages are stored for storefront closed messages? Can’t find them in language translation??

[quote name='UrKo' timestamp='1408965652' post='190569']btw, do you know where the messages are stored for storefront closed messages? Can't find them in language translation??

[/quote]



/store_closed.html

[quote name=‘UrKo’ timestamp=‘1408965652’ post=‘190569’]

perfect. thanks :)



btw, do you know where the messages are stored for storefront closed messages? Can’t find them in language translation??

[/quote]



For some reason these messages are located directly in the .php files in the app/Tygh directory

Yes I know it’s store_closed.html.

Problem is that in V4 it has this written:

<br />
[banner]<br />

```<br />
<br />
```php
<br />
[message]<br />

```<br />
<br />
Where is that text actually written?<br /><br />[quote name='eComLabs' timestamp='1408969759' post='190573']<br />
For some reason these messages are located directly in the [b].php[/b] files in the [b]app/Tygh[/b] directory<br />
[/quote]<br />
Thanks eComLabs <img src="upload://rA9Qa8gnUPZzRZRdI8kt3dpjkrs.png" class="bbc_emoticon" alt=":)"><br />
this is what i was looking for!

Interesting. It looks like they made it so it would work for multiple instances which in turn makes it harder to find where to edit.?

[quote name='The Tool' timestamp='1408970334' post='190577']

Interesting. It looks like they made it so it would work for multiple instances which in turn makes it harder to find where to edit.?

[/quote]



We found it in app/Tygh/Development.php



$placeholders = array(
'[title]' => 'Store closed',
'[banner]' => 'Store
closed',
'[message]' => 'Sorry, the store is temporarily closed for maintenance.'
);




and app/Tygh/Exceptions/AException.php



Development::showStub(array(
'[title]' => 'Service unavailable',
'[banner]' => 'Service
unavailable',
'[message]' => 'Sorry, service is temporarily unavailable.'
), $debug);

How could I make it multi lingual?

Or should I just add
and add slovenian language?

[quote name='UrKo' timestamp='1408977565' post='190582']

How could I make it multi lingual?

Or should I just add
and add slovenian language?

[/quote]



I am not sure why the did it in this way. Most possible some error messages can be displayed before language variables are loaded. So you can change these files directly.

[quote name='UrKo' timestamp='1408977565' post='190582']

How could I make it multi lingual?

Or should I just add
and add slovenian language?

[/quote]



I got same problem,

and solution is the simpliest.



Just make new Language variables in the Dictionary.

you need at least two variables, for the Title text, and Message text.

do something like this:

text_store_closed = “Sorry the store is closed… etc”

text_store_closed_title = “Store closed”

save them



next, open the /app/Tygh/Development.php and at the lines 100,101 and 102 make changes.



Change this:


'[title]' => 'Store closed',
'[banner]' => 'Store
closed',
'[message]' => 'Sorry, the store is temporarily closed for maintenance.'


To this:


'[title]' => __('text_store_closed_title'),
'[banner]' => __('text_store_closed_title'),
'[message]' => __('text_store_closed')




And all done, if you have SEO module Activated, users accesing your site with language variables like - example.com/en/ or example.com/sl/ will see a correct text on their languages.

Do note that the store closed page is used for multiple purposes and like ecomm said, language variables may not yet be initialized in all situations. So I would recommend use of the smarty default tag so you don't end up with nothing!

Guys, listen tbirnseth. We strongly recommend you to use the following solution:



'[title]' => function_exists('__') ? __('text_store_closed_title') : 'Store closed',
'[banner]' => function_exists('__') ? __('text_store_closed_title') : 'Store
closed',
'[message]' => function_exists('__') ? __('text_store_closed') : 'Sorry, the store is temporarily closed for maintenance.'

Correct solution… Thanks for posting it.



Who has the magic decoder ring for the store_closed page that displays all the base_64 data that is associated with it (assume it is the error information)? Is there something in the tools area that will decode and format the page?

Hi folks,



i have the same Problem “Service unavailable” so i didnt want to start a new Topic for it.

I happens when i sign in as a customer and i change my profil details for example the Country. After i click the save button, i will be forwarded to the Service unavailable page.



Can you help me to solve this Problem. We are running CSCart Version 4.2.3



THX

Mike

Please check post #2 at first.

I did, it was already uncomment. So i didnt had to change anything.



It looks like this

//define('DEVELOPMENT', true);



Unfortunately, this does not solve the problem.

:grin: :mrgreen: LOL ok i got what you want from me, it was a mistranslation from my side ^^.


I get this

[b] Message[/b]

Error processing request
[b] Error at[/b]

app/functions/fn.control.php, line: 193
[b] Backtrace[/b]
File: index.php Line: 25 Function: [b]fn_dispatch[/b]

Hoper this will help you