Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Uncaught Referenceerror: Tygh Is Not Defined At Index.php?dispatch=Profiles.update Rate Topic   - - - - -

 
  • ooaykac
  • Senior Member
  • Members
  • Join Date: 22-Nov 12
  • 297 posts

Posted 26 September 2019 - 12:37 PM #1

After upgrading to 4.10.4 SP1 I got the error below:

index.php?dispatch=profiles.update&selected_section=general:360 Uncaught ReferenceError: Tygh is not defined
    at index.php?dispatch=profiles.update&selected_section=general:360

And I attached detailed error line.

 

screenshot.jpg

 

I couldn't find the reason of the issue. 

 

PS: I use Vivashop theme updated latest version viva_v2.29.

Attached Thumbnails

  • screenshot.JPG


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11401 posts

Posted 26 September 2019 - 06:30 PM #2

Suggest manually clearing your cache by either removing or renaming var/cache directory.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • ooaykac
  • Senior Member
  • Members
  • Join Date: 22-Nov 12
  • 297 posts

Posted 27 September 2019 - 03:39 AM #3

I did it. But not solved. May it be a bug?
It's said that "Tygh is not defined". I checked Tygh folder, it is there where it is expected to be.

I reuploaded JS folder of latest 4.10.4 version and deleted cache again. But, the error hasn't gone.

Is this issue about TPL or PHP?



 
  • ooaykac
  • Senior Member
  • Members
  • Join Date: 22-Nov 12
  • 297 posts

Posted 29 September 2019 - 05:08 AM #4

I switched PHP to 7.1 and 7.2 and deleted cache manually, but the problem is same. It didn't work.

screnshot2.png

 



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 902 posts

Posted 29 September 2019 - 11:22 AM #5

Hello

 

This part code should be on the bottom page.

On your screen know that it is high in the code of the page. You don't have any modifications to the code?

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • ooaykac
  • Senior Member
  • Members
  • Join Date: 22-Nov 12
  • 297 posts

Posted 30 September 2019 - 06:55 AM #6

Hello

 

This part code should be on the bottom page.

On your screen know that it is high in the code of the page. You don't have any modifications to the code?

 

Best regards

Robert

 

No, I didn't do any modification on this script. 



 
  • ooaykac
  • Senior Member
  • Members
  • Join Date: 22-Nov 12
  • 297 posts

Posted 30 September 2019 - 08:04 AM #7

The script of "Country - City selection" doesn't work on frontpage but it works at admin side without any problem. This situation indicates that the problem is not about the server. If it was about the server, the script shouldn't be running at administrator side. But it works. 

BTW, I contacted to admin of server. They said that when they enable and check all extensions, the problem still occurs, same. But when they try to get "try catch" for testing purposes and provide control, there is no an error.

I think problem is not about extension on the server.



 
  • ooaykac
  • Senior Member
  • Members
  • Join Date: 22-Nov 12
  • 297 posts

Posted 01 October 2019 - 10:54 AM #8

I realized that
 
 
is being loaded before TYGH is defined. But the script, which tries loading states and countries, is being loaded before the jQuery loaded. (At the line 557) That's why TYGH can not be loaded properly. It fails.
 
But jQuery is being loaded. I don't understand why the script part appears before jQuery loaded. 
 
Fortunately, I have found the solution. I opened /public_html/design/themes/vivashop/templates/index.tpl
 
{include file="common/scripts.tpl"} <-- this line was at 112
I cut and put it above.
 
When I put this line {include file="common/scripts.tpl"} below the  
 
{if "DEVELOPMENT"|defined && $smarty.const.DEVELOPMENT == true}
 
jQuery isn't being loaded. But when I put {include file="common/scripts.tpl"} above the DEVELOPMENT line, jQuery is being loaded properly and works fine.
 
I think I fixed it but I am not sure whether this changes can cause some different problems. I hope CS-Cart developers could examine this issue.