THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline


Bonjour,


Dans une installation Thelia2 Beta2 sous Windows (et même deux !), dans le backoffice, page MODIFIER LE PRODUIT, je ne parviens pas à déposer d'image ni de document.

Lorsque j'essaye ces opérations, au lieu de s'ajouter en bas du cadre, l'image ou le document apparaît dans la moitié supérieure du cadre (celle où il est écrit "Déposez des fichiers...") avec une croix rouge dans le coin supérieur droit. De plus, un message "Server responded with 500 code" s'affiche lorsque le curseur de la souris survole cette image ou ce document. On peut accumuler ainsi plusieurs fichiers, tous avec la même croix rouge.
Suite à un rafraîchissement de la page, les pièces disparaissent.

Dans le pire des cas, les documents ne restent même pas dans le cadre.
Mais jamais une image ou un document ne reste enregistré.

Cela fonctionne de la même manière que le cadre soit vide ou qu'il contienne déjà des images importées avec la base "fake".


Par contre, dans une installation sur Mac, sous MAMP, tout cela fonctionne parfaitement.

Suis-je le seul utilisateur sur PC/Windows à qui cela arrive ?
Et en dehors de remplacer mes PC par des Mac, que me conseillez-vous ?

A bientôt. Cordialement.

  • manu
  • faï tot petar miladiu

Offline


Bonjour,

tu es le premier à nous faire remonter ce soucis (ou alors j'ai pas vu passer le message).

Tu es sous WAMP ? Quel windows ?

Merci


http://doc.thelia.net/
http://thelia.net/modules
http://raynaud.io
PGP public Key : 0xC6E546A6

Offline


Je confirme le problème.

L'upload, réalisé avec drag & drop ou sur sélection manuelle du chemin entraîne une erreur 500 "Server responded with 500 code".

Pour ma part, WAMP sous Windows 8.

Le log visiblement associé :

PHP Fatal error:  Uncaught exception 'LogicException' with message 'Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)' in C:\\wamp\\www\\thelia\\dossier 1 beta2\\core\\vendor\\symfony\\http-foundation\\Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser.php:116
Stack trace:
#0 C:\\wamp\\www\\thelia\\dossier 1 beta2\\core\\vendor\\symfony\\http-foundation\\Symfony\\Component\\HttpFoundation\\File\\File.php(79): Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser->guess('C:\\wamp\\tmp\\php...')
#1 C:\\wamp\\www\\thelia\\dossier 1 beta2\\core\\lib\\Thelia\\Controller\\Admin\\FileController.php(98): Symfony\\Component\\HttpFoundation\\File\\File->getMimeType()
#2 [internal function]: Thelia\\Controller\\Admin\\FileController->saveImageAjaxAction('1', 'product')
#3 C:\\wamp\\www\\thelia\\dossier 1 beta2\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\HttpKernel.php(129): call_user_func_array(Array, Array)
#4 C:\\wamp\\www\\thelia\\dossier 1 beta2\\core\\vendor\\symfony\\http-kernel\\Symfony\\Compone in C:\\wamp\\www\\thelia\\dossier 1 beta2\\core\\vendor\\symfony\\http-foundation\\Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser.php on line 116, referer: http://localhost:4656/thelia01/admin/products/update?product_id=1

Edit :
En activant l'extension php_fileinfo, le problème est résolu.

Last edited by alexandre (08-01-2014 11:43:36)


Plugins : Modèles Thelia | Boucle libre | Rubriques déclinables en produits | Colissimo Access/Expert

Offline


Bonjour,


Bravo Alexandre pour la solution.
Je confirme que ça fonctionne pour les images.

Pour les documents, c'est mieux aussi (les documents ne sont plus rejetés) mais pas entièrement au point (les documents chargés n'apparaissent pas dans l'onglet Documents qui continue à déclarer "Il n'y a aucun document lié à ce product". (avec le petit oubli de traduction sur produCt au passage ;-) ). Et pourtant, je retrouve bien les documents chargés dans \wamp\www\thelia\local\media\documents\product.

Pour répondre à Manu, mon Thelia V2 B2 est installé sous WAMP sous Windows 7.

Et j'ai fait tout ce que j'ai pu pour autoriser l'accès et l'écriture à l'ensemble de tous les dossiers et fichiers sous WAMP (mais Windows s'obstine à afficher que certains fichier sont en lecture seule).

On progresse. A plus pour la solution complète...

Cordialement.

Offline


Marcus,

Je n'ai pas ce deuxième soucis.
As-tu un log relatif à ce problème ? Sous WAMP, il faut faire un clic gauche sur l'icone WAMP, cliquer sur Apache et "Apache error log". Les dernières lignes du fichiers sont les dernieres erreurs qui se sont apparues sur cet Apache.


Plugins : Modèles Thelia | Boucle libre | Rubriques déclinables en produits | Colissimo Access/Expert

Offline


Bonjour Alexandre,

Je t'envoie ça par e-mail parce que c'est un peu volumineux pour l'afficher ici.
On y retrouve effectivement le même message que celui que tu as rapporté plus haut.
A bientôt.

Offline


Donc voilà ce qui peut-être intéressant :

[Wed Jan 08 17:13:30.079001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP Fatal error:  Class 'Thelia\\Controller\\Admin\\FeatureTemplateQuery' not found in C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Controller\\Admin\\ProductController.php on line 678, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:13:30.080001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP Stack trace:, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:13:30.080001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP   1. {main}() C:\\wamp\\www\\Lonessa\\web\\index.php:0, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:13:30.080001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP   2. Symfony\\Component\\HttpKernel\\Kernel->handle() C:\\wamp\\www\\Lonessa\\web\\index.php:15, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:13:30.080001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP   3. Thelia\\Core\\TheliaHttpKernel->handle() C:\\wamp\\www\\Lonessa\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\Kernel.php:197, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:13:30.080001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP   4. Symfony\\Component\\HttpKernel\\HttpKernel->handle() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Core\\TheliaHttpKernel.php:92, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:13:30.080001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP   5. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() C:\\wamp\\www\\Lonessa\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\HttpKernel.php:73, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:13:30.080001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP   6. call_user_func_array() C:\\wamp\\www\\Lonessa\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\HttpKernel.php:129, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:13:30.080001 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61098] PHP   7. Thelia\\Controller\\Admin\\ProductController->updateAttributesAndFeaturesAction() C:\\wamp\\www\\Lonessa\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\HttpKernel.php:129, referer: http://localhost/Lonessa/web/index.php/admin/products/update?product_id=1
[Wed Jan 08 17:25:25.534923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP Deprecated:  Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_location() directly. in C:\\wamp\\www\\Lonessa\\core\\vendor\\simplepie\\simplepie\\library\\SimplePie.php on line 640, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.534923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP Stack trace:, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.534923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   1. {main}() C:\\wamp\\www\\Lonessa\\web\\index.php:0, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   2. Symfony\\Component\\HttpKernel\\Kernel->handle() C:\\wamp\\www\\Lonessa\\web\\index.php:15, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   3. Thelia\\Core\\TheliaHttpKernel->handle() C:\\wamp\\www\\Lonessa\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\Kernel.php:197, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   4. Symfony\\Component\\HttpKernel\\HttpKernel->handle() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Core\\TheliaHttpKernel.php:92, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   5. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() C:\\wamp\\www\\Lonessa\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\HttpKernel.php:73, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   6. call_user_func_array() C:\\wamp\\www\\Lonessa\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\HttpKernel.php:129, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   7. Thelia\\Controller\\Admin\\BaseAdminController->processTemplateAction() C:\\wamp\\www\\Lonessa\\core\\vendor\\symfony\\http-kernel\\Symfony\\Component\\HttpKernel\\HttpKernel.php:129, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   8. Thelia\\Controller\\Admin\\BaseAdminController->render() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Controller\\Admin\\BaseAdminController.php:75, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP   9. Thelia\\Controller\\Admin\\BaseAdminController->renderRaw() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Controller\\Admin\\BaseAdminController.php:400, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  10. Thelia\\Core\\Template\\Smarty\\SmartyParser->render() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Controller\\Admin\\BaseAdminController.php:448, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  11. Thelia\\Core\\Template\\Smarty\\SmartyParser->internalRenderer() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Core\\Template\\Smarty\\SmartyParser.php:198, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  12. Smarty_Internal_TemplateBase->fetch() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Core\\Template\\Smarty\\SmartyParser.php:182, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  13. content_52c6aa1f3b62f6_08903477() C:\\wamp\\www\\Lonessa\\core\\vendor\\smarty\\smarty\\distribution\\libs\\sysplugins\\smarty_internal_templatebase.php:180, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  14. Thelia\\Core\\Template\\Smarty\\Plugins\\TheliaLoop->theliaLoop() C:\\wamp\\www\\Lonessa\\cache\\prod\\smarty\\compile\\806928bf9f4329ee2e43553d9c972c70f44d4918.file.thelia_news_feed.html.php:34, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  15. Thelia\\Core\\Template\\Element\\BaseLoop->exec() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Core\\Template\\Smarty\\Plugins\\TheliaLoop.php:133, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  16. Thelia\\Core\\Template\\Loop\\Feed->buildArray() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Core\\Template\\Element\\BaseLoop.php:351, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  17. SimplePie->__construct() C:\\wamp\\www\\Lonessa\\core\\lib\\Thelia\\Core\\Template\\Loop\\Feed.php:60, referer: http://localhost/Lonessa/web/index.php/admin/login
[Wed Jan 08 17:25:25.535923 2014] [:error] [pid 7548:tid 1504] [client 127.0.0.1:61142] PHP  18. trigger_error() C:\\wamp\\www\\Lonessa\\core\\vendor\\simplepie\\simplepie\\library\\SimplePie.php:640, referer: http://localhost/Lonessa/web/index.php/admin/login

On trouve une erreur fatale suite à une classe non trouvée et une erreur de type périmé.

Pour aller plus loin, pourrais-tu ? :

- préciser ta version de php
- nous assurer que tu as bien reproduit l'erreur juste avant de récupérer le log ... et oui sinon ce que l'on voit dans les dernières lignes peut ne rien à voir avec le sujet traité.


Plugins : Modèles Thelia | Boucle libre | Rubriques déclinables en produits | Colissimo Access/Expert

  • manu
  • faï tot petar miladiu

Offline


Bien vue pour la classe manquante. Le namespace n'a pas été importé en fait.

C'est corrigé dans la beta 3 que je vais publier aujourd'hui (si tout va bien)


http://doc.thelia.net/
http://thelia.net/modules
http://raynaud.io
PGP public Key : 0xC6E546A6