Jump to content

[Solved]Can't add category thumbnail image


Snade

Recommended Posts

Hello,
I got this error when trying to upload category image:
 

"Unexpected token <"

 

What can be the reason for this JS error ?

error.jpg

 

 

 

------
currently Im working on test website, that has been updated from 1.5 to 1.6. Maybe the upgrade or moving is somehow related.

This is the only place it gives me error when uploading image, tried on other locations and they work good

Thank you very much :)

========= UPDATE ===========

I found this http://stackoverflow.com/questions/18561556/syntax-error-unexpected-token
 

"This usually happens when you're including or posting to a file which doesn't exist. The server will return a regular html-formatted "404 Not Found" enclosed with

'<html></html>'

tags. That first chevron < isn't valid js nor valid json, therefore it triggers an unexpected token.

What if you try to change 'funcoes/enquete_adm.php' to an absolute url, just to be sure? "

 

===== solution =====

Uninstall, deleting files, getting original files from presta archive and installing again categories block module

 

 

Edited by Snade (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...
  • 2 months later...
  • 2 weeks later...
  • 5 weeks later...
  • 2 weeks later...

Me too, whenever i try to upload a product picture i have this :

 

Unexpected token <

 

How could i solve this ?

 

Thank you

 

Hi, i made a complete FTP backup and phpMyAdmin backup of my site, then i went to modules -> Block Category -> Reset. This worked for me!

Link to comment
Share on other sites

Hi, i made a complete FTP backup and phpMyAdmin backup of my site, then i went to modules -> Block Category -> Reset. This worked for me!

 

I did it too but nothing changed. Probably because my problem doesn't affect category pics but product pics ...

Link to comment
Share on other sites

  • 2 weeks later...

I want to also confirm that clicking RESET next to the category module will FIX this error.

 

I also backed up my site and created a database backup before resetting, but it was unnecessary. However I still recommend doing so. 

 

Depending on your site theme or layout, you will need to 'Position' your block again, as it will default to its native position after reset. Mine appeared on the left hand side of my site where I normally do not place blocks. Simply running Live Edit fixed this. 

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 weeks later...
×
×
  • Create New...