Jump to content

[SOLVED]Translation Field error


Recommended Posts

I have an error when Im gonna go and change the translation inside translation field options.

 

Anyone that can help me with this?

 

See image.post-356552-0-56947400-1337004548_thumb.jpg

 

ANYONE!! who knows what kind of problems this is??

 

I get crazy because I cant reach the translation at this part..... PLEASE!!! :wacko:

Link to comment
Share on other sites

The questionmarks (?) are icons not allowed in prestashop like this (ó or © or 1)

 

You might want to take a closer look at your translation.

Show me what you are willing to translate and to what you want it to tranlate.

 

Cheers helldog

Link to comment
Share on other sites

The questionmarks (?) are icons not allowed in prestashop like this (ó or © or 1)

 

You might want to take a closer look at your translation.

Show me what you are willing to translate and to what you want it to tranlate.

 

Cheers helldog

 

Hi Helldog:

 

Well I like to have that part to work, but it looks like the image I submit. And I dont know why it is like that. :-(

Link to comment
Share on other sites

It seems you are not having the abstractlogger in the right folder, or you just don't have it uploaded.

 

Try this:

open your Abstractlogger.php in folder /classes

change complete code to:

<?php
/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 14001 $
*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
abstract class AbstractLoggerCore
{
public $level;
protected $level_value = array(0 => 'DEBUG',
		   1 => 'INFO',
		 2 => 'WARNING',
		 3 => 'ERROR');
const DEBUG = 0;
const INFO = 1;
const WARNING = 2;
const ERROR = 3;
public function __construct($level = self::INFO)
{
 if (array_key_exists((int)$level, $this->level_value))
  $this->level = $level;
 else
  $this->level = self::INFO;
}
/**
* Log the message
*
* @param string message
* @param level
*/
abstract protected function logMessage($message, $level);
/**
* Check the level and log the message if needed
*
* @param string message
* @param level
*/
public function log($message, $level = self::DEBUG)
{
 if ($level >= $this->level)
 {
  $this->logMessage($message, $level);
 }
}
/**
* Log a debug message
*
* @param string message
*/
public function logDebug($message)
{
 $this->log($message, self::DEBUG);
}
/**
* Log an info message
*
* @param string message
*/
public function logInfo($message)
{
 $this->log($message, self::INFO);
}
/**
* Log a warning message
*
* @param string message
*/
public function logWarning($message)
{
 $this->log($message, self::WARNING);
}
/**
* Log an error message
*
* @param string message
*/
public function logError($message)
{
 $this->log($message, self::ERROR);
}
}

 

then create a new folder: classes/log/

and create a new .php document called AbstractLogger.php

Put this in the .php document:

 

<?php
/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 6844 $
*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/

abstract class AbstractLoggerCore
{
 public $level;
 protected $level_value = array(
	 0 => 'DEBUG',
	 1 => 'INFO',
	 2 => 'WARNING',
	 3 => 'ERROR',
 );

 const DEBUG = 0;
 const INFO = 1;
 const WARNING = 2;
 const ERROR = 3;

 public function __construct($level = self::INFO)
 {
	 if (array_key_exists((int)$level, $this->level_value))
		 $this->level = $level;
	 else
		 $this->level = self::INFO;
 }

 /**
 * Log the message
 *
 * @param string message
 * @param level
 */
 abstract protected function logMessage($message, $level);

 /**
  * Check the level and log the message if needed
  *
  * @param string message
  * @param level
  */
 public function log($message, $level = self::DEBUG)
 {
	 if ($level >= $this->level)
		 $this->logMessage($message, $level);
 }

 /**
 * Log a debug message
 *
 * @param string message
 */
 public function logDebug($message)
 {
	 $this->log($message, self::DEBUG);
 }

 /**
 * Log an info message
 *
 * @param string message
 */
 public function logInfo($message)
 {
	 $this->log($message, self::INFO);
 }

 /**
 * Log a warning message
 *
 * @param string message
 */
 public function logWarning($message)
 {
	 $this->log($message, self::WARNING);
 }

 /**
 * Log an error message
 *
 * @param string message
 */
 public function logError($message)
 {
	 $this->log($message, self::ERROR);
 }
}

 

Let me know if it worked out!

Link to comment
Share on other sites

It seems you are not having the abstractlogger in the right folder, or you just don't have it uploaded.

 

Try this:

open your Abstractlogger.php in folder /classes

change complete code to:

<?php
/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 14001 $
*  @license	http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
abstract class AbstractLoggerCore
{
public $level;
protected $level_value = array(0 => 'DEBUG',
		   1 => 'INFO',
		 2 => 'WARNING',
		 3 => 'ERROR');
const DEBUG = 0;
const INFO = 1;
const WARNING = 2;
const ERROR = 3;
public function __construct($level = self::INFO)
{
 if (array_key_exists((int)$level, $this->level_value))
  $this->level = $level;
 else
  $this->level = self::INFO;
}
/**
* Log the message
*
* @param string message
* @param level
*/
abstract protected function logMessage($message, $level);
/**
* Check the level and log the message if needed
*
* @param string message
* @param level
*/
public function log($message, $level = self::DEBUG)
{
 if ($level >= $this->level)
 {
  $this->logMessage($message, $level);
 }
}
/**
* Log a debug message
*
* @param string message
*/
public function logDebug($message)
{
 $this->log($message, self::DEBUG);
}
/**
* Log an info message
*
* @param string message
*/
public function logInfo($message)
{
 $this->log($message, self::INFO);
}
/**
* Log a warning message
*
* @param string message
*/
public function logWarning($message)
{
 $this->log($message, self::WARNING);
}
/**
* Log an error message
*
* @param string message
*/
public function logError($message)
{
 $this->log($message, self::ERROR);
}
}

 

then create a new folder: classes/log/

and create a new .php document called AbstractLogger.php

Put this in the .php document:

 

<?php
/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 6844 $
*  @license	http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/

abstract class AbstractLoggerCore
{
 public $level;
 protected $level_value = array(
	 0 => 'DEBUG',
	 1 => 'INFO',
	 2 => 'WARNING',
	 3 => 'ERROR',
 );

 const DEBUG = 0;
 const INFO = 1;
 const WARNING = 2;
 const ERROR = 3;

 public function __construct($level = self::INFO)
 {
	 if (array_key_exists((int)$level, $this->level_value))
		 $this->level = $level;
	 else
		 $this->level = self::INFO;
 }

 /**
 * Log the message
 *
 * @param string message
 * @param level
 */
 abstract protected function logMessage($message, $level);

 /**
  * Check the level and log the message if needed
  *
  * @param string message
  * @param level
  */
 public function log($message, $level = self::DEBUG)
 {
	 if ($level >= $this->level)
		 $this->logMessage($message, $level);
 }

 /**
 * Log a debug message
 *
 * @param string message
 */
 public function logDebug($message)
 {
	 $this->log($message, self::DEBUG);
 }

 /**
 * Log an info message
 *
 * @param string message
 */
 public function logInfo($message)
 {
	 $this->log($message, self::INFO);
 }

 /**
 * Log a warning message
 *
 * @param string message
 */
 public function logWarning($message)
 {
	 $this->log($message, self::WARNING);
 }

 /**
 * Log an error message
 *
 * @param string message
 */
 public function logError($message)
 {
	 $this->log($message, self::ERROR);
 }
}

 

Let me know if it worked out!

 

 

I had the Abstract.php in /classes and I created the file you wanted me to in a folder classes/log/ and the php file there to, its still the same

Link to comment
Share on other sites

This is how it looks now:

 

Mac OS X 2��ATTR;�����&�&com.apple.quarantine0000;4f909036;Safari;|com.apple.SafariThis resource fork intentionally left blank ��

Fatal error: Uncaught exception 'ReflectionException' with message 'Class ._AbstractLoggerCore does not exist' in /www/webvol3/kl/fe58ukd464p7l37/hairofbeauty.com/public_html/config/autoload.php:52 Stack trace: #0 /www/webvol3/kl/fe58ukd464p7l37/hairofbeauty.com/public_html/config/autoload.php(52): ReflectionClass->__construct('._AbstractLogge...') #1 [internal function]: __autoload('._AbstractLogge...') #2 /www/webvol3/kl/fe58ukd464p7l37/hairofbeauty.com/public_html/admin_beauty/tabs/AdminTranslations.php(1196): class_exists('._AbstractLogge...') #3 /www/webvol3/kl/fe58ukd464p7l37/hairofbeauty.com/public_html/admin_beauty/tabs/AdminTranslations.php(763): AdminTranslations->displayFormFields('se') #4 /www/webvol3/kl/fe58ukd464p7l37/hairofbeauty.com/public_html/admin_beauty/index.php(114): AdminTranslations->display() #5 {main} thrown in /www/webvol3/kl/fe58ukd464p7l37/hairofbeauty.com/public_html/config/autoload.php on line 52

Link to comment
Share on other sites

Hi corecosmetic,

You can always change the translations manually in the /translations directory of your site.

 

I hope this helps.

 

-Mike

 

Hi Mike, But Im that kind of person that likes to have all things work as it should and 100%.

You dont know what kind of problems this is?

 

//Patrik

Link to comment
Share on other sites

Hi Patrik,

We are trying to look into it further, but helldog's suggestion above is the same one I would provide based purely on the error message you provided.

 

What version of PrestaShop are you using?

 

-Mike

 

Its PS 1.4.7.3 ;-)

Link to comment
Share on other sites

I had a developer take a look at this for you a little deeper, and he had two suggestions: Can you please try temporarily switching your theme to see if the issue persists? If it does, can you also please try it from another computer?

 

-Mike

 

I logged in to a PC with XP / Internet Explorer and still look the same there.

And still the same if I change the theme. :-(

Link to comment
Share on other sites

Have you added any external modules recently? It is likely that one of those is causing you these issues.

 

-Mike

 

only the Payson payment module, but it was like this before that.

 

Then I have installed the Klarna Payment module, but its the same there, I installed them after this happen.

Link to comment
Share on other sites

only the Payson payment module, but it was like this before that.

 

Then I have installed the Klarna Payment module, but its the same there, I installed them after this happen.

 

So other than those two modules, you only have the default modules that came with PrestaShop?

 

-Mike

Link to comment
Share on other sites

Okay I took a look into your massive failure.

Can you send the code of config/autoload.php please?

 

It seems the failure is in there and can't find the abstractlogger

 

Yepp here it is:

 

<?php

/*

* 2007-2012 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Open Software License (OSL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:

* http://opensource.org/licenses/osl-3.0.php

* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

* @author PrestaShop SA <[email protected]>

* @copyright 2007-2012 PrestaShop SA

* @version Release: $Revision: 14009 $

* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

* International Registered Trademark & Property of PrestaShop SA

*/

 

function __autoload($className)

{

if (function_exists('smartyAutoload') AND smartyAutoload($className))

return true;

 

$className = str_replace(chr(0), '', $className);

$classDir = dirname(__FILE__).'/../classes/';

$overrideDir = dirname(__FILE__).'/../override/classes/';

$file_in_override = file_exists($overrideDir.$className.'.php');

$file_in_classes = file_exists($classDir.$className.'.php');

 

// This is a Core class and its name is the same as its declared name

if (substr($className, -4) == 'Core')

require_once($classDir.substr($className, 0, -4).'.php');

else

{

if ($file_in_override && $file_in_classes)

{

require_once($classDir.str_replace(chr(0), '', $className).'.php');

require_once($overrideDir.$className.'.php');

}

elseif (!$file_in_override && $file_in_classes)

{

require_once($classDir.str_replace(chr(0), '', $className).'.php');

$classInfos = new ReflectionClass($className.((interface_exists($className, false) or class_exists($className, false)) ? '' : 'Core'));

if (!$classInfos->isInterface() && substr($classInfos->name, -4) == 'Core')

eval(($classInfos->isAbstract() ? 'abstract ' : '').'class '.$className.' extends '.$className.'Core {}');

}

elseif ($file_in_override && !$file_in_classes)

require_once($overrideDir.$className.'.php');

}

}

Link to comment
Share on other sites

I am not sure if this will work out for you but it seems many more people have the same problem.

You add files in classes directory. This one are included in this specific page and make problems.

 

Try to rename your AbstractLogger.php to _AbstractLogger.php

Let's see if this makes any changes, don't forget to make back-ups for every change you make.

 

Cheers Helldog

Link to comment
Share on other sites

I am not sure if this will work out for you but it seems many more people have the same problem.

You add files in classes directory. This one are included in this specific page and make problems.

 

Try to rename your AbstractLogger.php to _AbstractLogger.php

Let's see if this makes any changes, don't forget to make back-ups for every change you make.

 

Cheers Helldog

Nothing happens

Link to comment
Share on other sites

Checked your BO, but I don't see any problems, try to make the BO language to english.

Cause I don't see any problems in translating..

 

cheers helldog!

 

But it is in english right now, and when I go to (Field Name Translations) I got that error, it does not mather if the BO is in English or Swedish.

 

And even If I click on the other flags (languages) I got the same results.

Link to comment
Share on other sites

I would suggest using curl instead of fopen(). curl is both more flexible, and more secure. Many servers disable allow_url_fopen, curl also fails more gracefully when there are problems on the remote server.

 

Ask your host to set up fopen() correctly or let them use cURL because if you look into your BO and go to

tools --> Configuration Information

 

You will see an error below the page regarding fOpen()

Let them check this out, I guess the problem will be solved then

Link to comment
Share on other sites

Okay took me some time to find this all out..

This next is all for your own risk

 

You planted your website on FreeBSD if I am not mistaken.

if you have acces to php.ini open it and allow fopen() to solve the problem.

 

I think then problem is solved.

If you can not get to the php.ini then ask your hosting company to settle things correct!

 

Cheers helldog!

Link to comment
Share on other sites

I would suggest using curl instead of fopen(). curl is both more flexible, and more secure. Many servers disable allow_url_fopen, curl also fails more gracefully when there are problems on the remote server.

 

Ask your host to set up fopen() correctly or let them use cURL because if you look into your BO and go to

tools --> Configuration Information

 

You will see an error below the page regarding fOpen()

Let them check this out, I guess the problem will be solved then

 

okey I email them the problem and se if that will be solved through that. Could you see the image problems to?

Link to comment
Share on other sites

No I haven't seen the error you are experiencing, I don't know why I don't see it and you do..

But this might be solved after the fopen() problem.

 

Let's wait for that and see what happens.. if it does not change the problem you are having in the translate section let me know..

 

Cheers helldog!

Link to comment
Share on other sites

No I haven't seen the error you are experiencing, I don't know why I don't see it and you do..

But this might be solved after the fopen() problem.

 

Let's wait for that and see what happens.. if it does not change the problem you are having in the translate section let me know..

 

Cheers helldog!

 

My hosting company said they dont use that because of a security risk.

But they asking me to use this.

 

https://support.loopia.com/wiki/Open_and_include_files_from_a_remote_site

Link to comment
Share on other sites

My hosting company said they dont use that because of a security risk.

But they asking me to use this.

 

https://support.loop...m_a_remote_site

And for me its strange that YOU dont see the same result when you are looking, because if you dont see it , it must be localy at my computer or settings with my browser. I had 3 more persons who went in that see the same as me.

 

Are you looking at the right place??

Link to comment
Share on other sites

I made a screenshot for you a couple of pages up.. So yes I think I am looking at the same page as you are.

 

I went to tools --> Translations (and I could change the words I wanted it to change to..

 

Had no problems changing words and sentences.. cheers helldog!

Link to comment
Share on other sites

And if I read your link you where sending bout fopen() in your host it doesn't allow a lot of things because lots of things are set up as fopen()

 

You might want to change host for better use of PS!

Cheers Helldog!

 

Please do like this:

 

Go to BO, to translations, make the choice Field Name Translations and after that click US or Swedish flag and please screenshoot what the results show, sorry for this problems.

Link to comment
Share on other sites

Okay I fixed your translations page.

I renamed all backed-up classes files to _{name} instead of ._{name} planted it in classes/back-up

 

Now it is fixed and works perfectly, let me know if it works for you aswell..

Cheers helldog!

 

WOOOW Im so happy, thank you so much, you just made my day hahaha.

But why did it went out like that?

Is it a bug in PS or?

Link to comment
Share on other sites

I am not sure it might be many things.

Maybe you made back-ups and saved it in the wrong folders?

Maybe a bug in one of the downloadable themes?

 

Might be many factors, but problems seems to be solved so please put [sOLVED] infront of your topic!

 

Cheers helldog!

Link to comment
Share on other sites

×
×
  • Create New...