# Mautic Javascrip Links and Update Failure

**URL:** <https://forum.mautic.org/t/mautic-javascrip-links-and-update-failure/4182>\
**Category:** Product Support\
**Created:** [June 27, 2016, 11:06pm UTC](https://forum.mautic.org/t/mautic-javascrip-links-and-update-failure/4182 "2016-06-27T23:06:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![webadocious](https://avatars.discourse-cdn.com/v4/letter/w/e47774/32.png) [@webadocious](https://forum.mautic.org/u/webadocious)\
**Post date:** [June 27, 2016, 11:06pm UTC](https://forum.mautic.org/t/mautic-javascrip-links-and-update-failure/4182/1 "2016-06-27T23:06:56Z")

</div>

Thanks for what is an up and coming marketing automation platform. We’re enjoying the ride.  
  
  
  
We have had a problem with javascript links not redirecting properly on an install and it prompted us to try an update via:  
  
  
  
php app/console mautic:update:apply  
  
  
  
The update failed with the error:  
  
  
  
PHP Fatal error: Undefined class constant ‘BUILD\_MAUTIC\_JS’ in /path/to/mautic/app/bundles/CoreBundle/EventListener/BuildJsSubscriber.php on line 27  
  
  
  
I’m guessing there is a relationship between the javascript links not working properly, and this update failure but not sure.  
  
  
  
We have reverted back to the backed up version but would appreciate any thoughts on what might be the problem.  
  
  
  
I am not a programmer but do know enough to get myself in trouble, so your “noob” approach would be helpful. ![;-)]( ";-)")  
  
  
  
Thanks

---

<div class="post-metadata">

**Author:** ![webadocious](https://avatars.discourse-cdn.com/v4/letter/w/e47774/32.png) [@webadocious](https://forum.mautic.org/u/webadocious)\
**Post date:** [June 27, 2016, 11:06pm UTC](https://forum.mautic.org/t/mautic-javascrip-links-and-update-failure/4182/2 "2016-06-27T23:06:56Z")

</div>

Thanks for what is an up and coming marketing automation platform. We’re enjoying the ride.

We have had a problem with javascript links not redirecting properly on an install and it prompted us to try an update via:

php app/console mautic:update:apply

The update failed with the error:

PHP Fatal error: Undefined class constant ‘BUILD\_MAUTIC\_JS’ in /path/to/mautic/app/bundles/CoreBundle/EventListener/BuildJsSubscriber.php on line 27

I’m guessing there is a relationship between the javascript links not working properly, and this update failure but not sure.

We have reverted back to the backed up version but would appreciate any thoughts on what might be the problem.

I am not a programmer but do know enough to get myself in trouble, so your “noob” approach would be helpful. 😉

Thanks

---

<div class="post-metadata">

**Author:** ![yalcin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yalcin/32/29_2.png) [@yalcin](https://forum.mautic.org/u/yalcin)\
**Post date:** [July 24, 2016, 1:01am UTC](https://forum.mautic.org/t/mautic-javascrip-links-and-update-failure/4182/3 "2016-07-24T01:01:56Z")

</div>

I ran into this same issue.

The automatic update kept timing out, so I user terminal access with command:  
php app/console mautic:update:apply

and I get this error:  
PHP Fatal error: Undefined class constant ‘BUILD\_MAUTIC\_JS’ in /path/to/mautic/app/bundles/CoreBundle/EventListener/BuildJsSubscriber.php on line 27
