Avisos
Vaciar todo

Hosting WordPress 70% dto Dominios promo

descripcion categorias problema al aumentar el numero de caracteres.  

Página 1 / 3
 
Alvaro
 Alvaro
Estimable Member

:unsure: :unsure: :unsure:
Hola! Intentando modificar la cantidad de caracteres que aparecen en la descripcion de categorias, y haciendo lo que ponía paso a paso, me aparece un error 500 en tods las categorias.
He seguido los pasos y al principio funciono hasta que intente trasladar el archivo a la carpeta /override/controllers/front/CategoryController.php
De repente me aparece el error 500 y no se por qué.
Ya digo, al principio todo fue bien pero como lei que era necesario trasladar el archivo estuve intentando lo mover y cuando fui a comprobar si seguia llendo bien, dejo de funcionar.
No se porque ha podido ser.
No he vuelto a tocar nada, no vaya a ser que la siga cagando.
Me gustaria poder tener más caracteres y que no salga el "más" ese tan feo.
Quiero desripciones suficientemente largas para las categorias.
Muchas gracias!

URL del sitio: Contenido solo visible a usuarios registrados

Citar
Respondido : 25/10/2016 11:14 pm
Johnny Heredia Montiel
 Johnny Heredia Montiel
Miembro Moderator

Hola,

Si te ha generado un error 500 se tuvo que haber generado un fichero error_log, verifica el siguiente enlace y envíanos las lineas de error: https://www.webempresa.com/blog/que-es-un-error-500-y-como-localizarlo-en-nuestra-web.html

ResponderCitar
Respondido : 26/10/2016 4:42 am

Alvaro
 Alvaro
Estimable Member

Hola!
Creo que este es el error de ayer.

ASCII text
[08-Sep-2016 13:30:40 Europe/Madrid] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 208 bytes) in /home/intensex/public_html/tools/smarty/sysplugins/smarty_internal_template.php on line 693
[08-Sep-2016 13:30:45 Europe/Madrid] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 851968 bytes) in /home/intensex/public_html/cache/smarty/compile/c0/1b/29/c01b29f4b4d1004fc50cbc161eb6b422e1d77273.file.product-list.tpl.php on line 135
[09-Sep-2016 12:19:21 Europe/Madrid] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 208 bytes) in /home/intensex/public_html/tools/smarty/sysplugins/smarty_internal_template.php on line 693
[09-Sep-2016 12:19:33 Europe/Madrid] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 208 bytes) in /home/intensex/public_html/tools/smarty/sysplugins/smarty_internal_template.php on line 693
[09-Sep-2016 12:19:47 Europe/Madrid] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 524288 bytes) in /home/intensex/public_html/cache/smarty/compile/c0/1b/29/c01b29f4b4d1004fc50cbc161eb6b422e1d77273.file.product-list.tpl.php on line 224
[09-Sep-2016 12:19:54 Europe/Madrid] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 208 bytes) in /home/intensex/public_html/tools/smarty/sysplugins/smarty_internal_template.php on line 693
[09-Sep-2016 12:21:54 Europe/Madrid] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 208 bytes) in /home/intensex/public_html/tools/smarty/sysplugins/smarty_internal_template.php on line 693
[25-Oct-2016 21:49:57 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:50:00 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:50:01 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:50:23 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:51:05 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:51:09 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:51:26 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:52:48 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:59:18 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 21:59:19 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:01:03 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:01:04 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:01:50 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:01:51 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:03:24 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:03:28 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:04:00 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:04:01 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:05:16 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134
[25-Oct-2016 22:05:18 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134

ResponderCitar
Respondido : 26/10/2016 10:00 am
Pepe
 Pepe
Soporte CMS Webempresa Admin

Hola Alvaro.

Este es el error que veo:

[25-Oct-2016 22:05:18 Europe/Madrid] PHP Fatal error: Class 'categorycontroller' not found in /home/intensex/public_html/classes/controller/Controller.php on line 134

Este error es debido a la falta del archivo.

Comentaste que moviste el archivo anteriormente, déjalo todo como estaba al principio, elimina las modificaciones que realizaste y vuelve a dejar el archivo como estaba.

Una vez tengas eso solucionado, indícalo y vemos lo de los caracteres, pero lo primero es solucionar el error.

Un saludo

ResponderCitar
Respondido : 26/10/2016 10:29 am

Cursos Gratuitos WordPress

Alvaro
 Alvaro
Estimable Member

El caso es que no moví nada...no me dajaba hacerlo...de hecho es que no sé porque esta en esa carpeta...nunca la abrí.
No se como dejar el archivo como estaba porque no se que archivo es.
Yo solo toque category. tpl de public_html/themes/Carme
e intente mover el archivo categorycontroller.php a la carpeta public_html/override/controllers/front como decia en el mesanje del foro.
No se como recuperar lo que dices!!
Gracias y perdona las molestias...

ResponderCitar
Respondido : 26/10/2016 10:48 am
Pepe
 Pepe
Soporte CMS Webempresa Admin

Hola Alvaro.

El error, como te comente antes, hacer referencia al archivo categorycontroller.php.
El archivo Controller.php tiene una linea que hace referencia al archivo ' categorycontroller.php ' y ese archivo o no esta o si lo modificaste no esta bien.

Comprueba si se encuentra el archivo ' categorycontroller.php ' dentro de la carpeta controllers/front

¿ Que versión de prestashop tienes ?

Un saludo

ResponderCitar
Respondido : 26/10/2016 11:22 am

wpdoctor-revisa-la-salud-de-tu-wordpress

Alvaro
 Alvaro
Estimable Member

Si que esta el archivo categorycontroller.php en la carpeta que me indicas (controllers/front)
la versión es la 1.6.

ResponderCitar
Respondido : 26/10/2016 11:31 am
Alvaro
 Alvaro
Estimable Member

Ahora me da problemas la descripcion corta de los productos. No me deja guardarla, la escribo pero no me aparece nada...sera por eso también?

ResponderCitar
Respondido : 26/10/2016 11:33 am

Gestor de Contraseñas - VPN Conexión Segura - Gestor 2FA (Segundo Factor de Autenticación

Pepe
 Pepe
Soporte CMS Webempresa Admin

Hola Alvaro.
ok, adjúntame los archivos categorycontroller.php y Controller.php, para que los revisemos.

Un saludo

ResponderCitar
Respondido : 26/10/2016 12:05 pm
Alvaro
 Alvaro
Estimable Member

El controller.php no lo encuentro por ninguna parte...

ResponderCitar
Respondido : 26/10/2016 12:16 pm

optimiza-automaticamente-todas-las-imagenes-de-tu-wordpress

Alvaro
 Alvaro
Estimable Member

Aqui esta el categorycontroller.php pero el controller.php no lo encuentro.

/*
* 2007-2015 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 license@prestashop.com 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
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/

class CategoryControllerCore extends FrontController
{
/** string Internal controller name */
public $php_self = 'category';

/** @var Category Current category object */
protected $category;

/** @var bool If set to false, customer cannot view the current category. */
public $customer_access = true;

/** @var int Number of products in the current page. */
protected $nbProducts;

/** @var array Products to be displayed in the current page . */
protected $cat_products;

/**
* Sets default medias for this controller
*/
public function setMedia()
{
parent::setMedia();

if (!$this->useMobileTheme()) {
//TODO : check why cluetip css is include without js file
$this->addCSS(array(
_THEME_CSS_DIR_.'scenes.css' => 'all',
_THEME_CSS_DIR_.'category.css' => 'all',
_THEME_CSS_DIR_.'product_list.css' => 'all',
));
}

$scenes = Scene::getScenes($this->category->id, $this->context->language->id, true, false);
if ($scenes && count($scenes)) {
$this->addJS(_THEME_JS_DIR_.'scenes.js');
$this->addJqueryPlugin(array('scrollTo', 'serialScroll'));
}

$this->addJS(_THEME_JS_DIR_.'category.js');
}

/**
* Redirects to canonical or "Not Found" URL
*
* @param string $canonical_url
*/
public function canonicalRedirection($canonical_url = '')
{
if (Tools::getValue('live_edit')) {
return;
}

if (!Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop() || in_array($this->category->id, array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY')))) {
$this->redirect_after = '404';
$this->redirect();
}

if (!Tools::getValue('noredirect') && Validate::isLoadedObject($this->category)) {
parent::canonicalRedirection($this->context->link->getCategoryLink($this->category));
}
}

/**
* Initializes controller
*
* @see FrontController::init()
* @throws PrestaShopException
*/
public function init()
{
// Get category ID
$id_category = (int)Tools::getValue('id_category');
if (!$id_category || !Validate::isUnsignedId($id_category)) {
$this->errors[] = Tools::displayError('Missing category ID');
}

// Instantiate category
$this->category = new Category($id_category, $this->context->language->id);

parent::init();

// Check if the category is active and return 404 error if is disable.
if (!$this->category->active) {
header('HTTP/1.1 404 Not Found');
header('Status: 404 Not Found');
}

// Check if category can be accessible by current customer and return 403 if not
if (!$this->category->checkAccess($this->context->customer->id)) {
header('HTTP/1.1 403 Forbidden');
header('Status: 403 Forbidden');
$this->errors[] = Tools::displayError('You do not have access to this category.');
$this->customer_access = false;
}
}

/**
* Initializes page content variables
*/
public function initContent()
{
parent::initContent();

$this->setTemplate(_PS_THEME_DIR_.'category.tpl');

if (!$this->customer_access) {
return;
}

if (isset($this->context->cookie->id_compare)) {
$this->context->smarty->assign('compareProducts', CompareProduct::getCompareProducts((int)$this->context->cookie->id_compare));
}

// Product sort must be called before assignProductList()
$this->productSort();

$this->assignScenes();
$this->assignSubcategories();
$this->assignProductList();

$this->context->smarty->assign(array(
'category' => $this->category,
'description_short' => Tools::truncateString($this->category->description, 3500),
'products' => (isset($this->cat_products) && $this->cat_products) ? $this->cat_products : null,
'id_category' => (int)$this->category->id,
'id_category_parent' => (int)$this->category->id_parent,
'return_category_name' => Tools::safeOutput($this->category->name),
'path' => Tools::getPath($this->category->id),
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'categorySize' => Image::getSize(ImageType::getFormatedName('category')),
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
'thumbSceneSize' => Image::getSize(ImageType::getFormatedName('m_scene')),
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
'allow_oosp' => (int)Configuration::get('PS_ORDER_OUT_OF_STOCK'),
'comparator_max_item' => (int)Configuration::get('PS_COMPARATOR_MAX_ITEM'),
'suppliers' => Supplier::getSuppliers(),
'body_classes' => array($this->php_self.'-'.$this->category->id, $this->php_self.'-'.$this->category->link_rewrite)
));
}

/**
* Assigns scenes template variables
*/
protected function assignScenes()
{
// Scenes (could be externalised to another controller if you need them)
$scenes = Scene::getScenes($this->category->id, $this->context->language->id, true, false);
$this->context->smarty->assign('scenes', $scenes);

// Scenes images formats
if ($scenes && ($scene_image_types = ImageType::getImagesTypes('scenes'))) {
foreach ($scene_image_types as $scene_image_type) {
if ($scene_image_type['name'] == ImageType::getFormatedName('m_scene')) {
$thumb_scene_image_type = $scene_image_type;
} elseif ($scene_image_type['name'] == ImageType::getFormatedName('scene')) {
$large_scene_image_type = $scene_image_type;
}
}

$this->context->smarty->assign(array(
'thumbSceneImageType' => isset($thumb_scene_image_type) ? $thumb_scene_image_type : null,
'largeSceneImageType' => isset($large_scene_image_type) ? $large_scene_image_type : null,
));
}
}

/**
* Assigns subcategory templates variables
*/
protected function assignSubcategories()
{
if ($sub_categories = $this->category->getSubCategories($this->context->language->id)) {
$this->context->smarty->assign(array(
'subcategories' => $sub_categories,
'subcategories_nb_total' => count($sub_categories),
'subcategories_nb_half' => ceil(count($sub_categories) / 2)
));
}
}

/**
* Assigns product list template variables
*/
public function assignProductList()
{
$hook_executed = false;
Hook::exec('actionProductListOverride', array(
'nbProducts' => &$this->nbProducts,
'catProducts' => &$this->cat_products,
'hookExecuted' => &$hook_executed,
));

// The hook was not executed, standard working
if (!$hook_executed) {
$this->context->smarty->assign('categoryNameComplement', '');
$this->nbProducts = $this->category->getProducts(null, null, null, $this->orderBy, $this->orderWay, true);
$this->pagination((int)$this->nbProducts); // Pagination must be call after "getProducts"
$this->cat_products = $this->category->getProducts($this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay);
}
// Hook executed, use the override
else {
// Pagination must be call after "getProducts"
$this->pagination($this->nbProducts);
}

$this->addColorsToProductList($this->cat_products);

Hook::exec('actionProductListModifier', array(
'nb_products' => &$this->nbProducts,
'cat_products' => &$this->cat_products,
));

foreach ($this->cat_products as &$product) {
if (isset($product['id_product_attribute']) && $product['id_product_attribute'] && isset($product['product_attribute_minimal_quantity'])) {
$product['minimal_quantity'] = $product['product_attribute_minimal_quantity'];
}
}

$this->context->smarty->assign('nb_products', $this->nbProducts);
}

/**
* Returns an instance of the current category
*
* @return Category
*/
public function getCategory()
{
return $this->category;
}
}

ResponderCitar
Respondido : 26/10/2016 1:15 pm
Pepe
 Pepe
Soporte CMS Webempresa Admin

Hola Alvaro.

Lo tienes que tener dentro de la ruta classes/controller/Controller.php , si no esta, ese es el archivo que te falta.

Prueba a restaurarlo desde cPremote en tu cuenta de cPanel.
.- Accede a cPanel
.- Selecciona cPremote Backup Management
.- Selecciona Restore File / Directory

Send restore report to email address: La dirección de correo donde quieres que te manden el aviso de la restauración del archivo.
from your home folder: classes/controller/Controller.php
Select Backup From: selecciona una fecha anterior a las modificaciones que realizaste y pulsa en restore

Comprueba si se restaura el archivo y se soluciono el problema

Si ves que no surte efecto indícanos que versión tienes de prestashop 1.6.*, puede ser 1.6.1.4, 1.6.1.7.

Un saludo

ResponderCitar
Respondido : 26/10/2016 1:22 pm

Alvaro
 Alvaro
Estimable Member

Creo que si que esta ¿Es este?

ResponderCitar
Respondido : 26/10/2016 2:03 pm
Jhon
 Jhon
Soporte CMS Webempresa Moderator

HOla

Que es lo que has cambiado en el archivo /override/controllers/front/CategoryController.php ?
Es el único archivo que has tocado, si mueves este archivo o deshaces los cambios realizados te funciona correctamente?

Te sugiero no copiar y pegar el contenido de tu archivo .php, mejor adjuntalo como archivo , puedes comprimirlo .zip para que puedas adjuntarlo.

Saludos.

ResponderCitar
Respondido : 26/10/2016 7:23 pm

Cursos Gratuitos WordPress

Alvaro
 Alvaro
Estimable Member

No sé que hacer...
Solo he cambiado el numero 350 por 3000. Funciono correctamente, pero fui a hacer el paso de trasladarlo a override desde public_html/controllers/front
No se que ha podido pasar pero quisiera restaurarlo.
El problema es que no entiendo mucho de programación.
Gracias!

ResponderCitar
Respondido : 26/10/2016 11:56 pm
Página 1 / 3