# 500 server error upon submitting form

**URL:** <https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507>\
**Category:** General Discussion\
**Created:** [February 5, 2015, 7:54pm UTC](https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507 "2015-02-05T19:54:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nateritter](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@nateritter](https://forum.mautic.org/u/nateritter)\
**Post date:** [February 5, 2015, 7:54pm UTC](https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507/1 "2015-02-05T19:54:48Z")

</div>

I have a test form setup that just takes email addresses. Upon submitting it, I get the following error in the logs and a 500 error displaying:

Code:

[2015-02-05 19:53:38] mautic.CRITICAL: Uncaught PHP Exception BadMethodCallException: "Undefined method 'updateLastActive'. The method name must start with either findBy or findOneBy!" at /Users/nateritter/Sites/mautic.dev/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php line 226 {"exception":"[object] (BadMethodCallException(code: 0): Undefined method 'updateLastActive'. The method name must start with either findBy or findOneBy! at /Users/nateritter/Sites/mautic.dev/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:226)"} []

---

<div class="post-metadata">

**Author:** ![nateritter](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@nateritter](https://forum.mautic.org/u/nateritter)\
**Post date:** [February 5, 2015, 7:54pm UTC](https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507/2 "2015-02-05T19:54:48Z")

</div>

I have a test form setup that just takes email addresses. Upon submitting it, I get the following error in the logs and a 500 error displaying:

```auto
[2015-02-05 19:53:38] mautic.CRITICAL: Uncaught PHP Exception BadMethodCallException: "Undefined method 'updateLastActive'. The method name must start with either findBy or findOneBy!" at /Users/nateritter/Sites/mautic.dev/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php line 226 {"exception":"[object] (BadMethodCallException(code: 0): Undefined method 'updateLastActive'. The method name must start with either findBy or findOneBy! at /Users/nateritter/Sites/mautic.dev/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:226)"} []
```

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 5, 2015, 8:04pm UTC](https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507/3 "2015-02-05T20:04:17Z")

</div>

Hey Nate,

Sorry about that. I just pushed an update to fix this.

Open app/bundles/LeadBundle/Entity/LeadRepository.php and search for updateLeadLastActive and change it to updateLastActive.

Thanks!  
Alam

---

<div class="post-metadata">

**Author:** ![nateritter](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@nateritter](https://forum.mautic.org/u/nateritter)\
**Post date:** [February 5, 2015, 8:49pm UTC](https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507/4 "2015-02-05T20:49:40Z")

</div>

Great, thanks. Not sure if this is related or not to the fix, but on `/leads/view/1` there’s some new JS errors I hadn’t seen before:

![](https://dl.dropboxusercontent.com/spa/q4axhbeb39ebwh8/4-7747qt.png)

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 5, 2015, 11:41pm UTC](https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507/5 "2015-02-05T23:41:33Z")

</div>

Did you overwrite your existing beta3 installation with the github source? Or is it a totally different folder? If the former, you may want to try deleting media/js/app.js and libraries.js (they will be regenerated when you refresh the page). It’s possible the prod assets got out of sync with the source files in the repo.

Also try clearing your browsers cache.

Thanks!  
Alan

---

<div class="post-metadata">

**Author:** ![nateritter](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@nateritter](https://forum.mautic.org/u/nateritter)\
**Post date:** [February 6, 2015, 12:52am UTC](https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507/6 "2015-02-06T00:52:13Z")

</div>

I started from scratch completely… new database, new folder, etc. It’s possible the browser cache had something to do with it. I haven’t seen it in a while, so perhaps nevermind until I can recreate the issue.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 11:00pm UTC](https://forum.mautic.org/t/500-server-error-upon-submitting-form/1507/7 "2020-02-02T23:00:54Z")

</div>


