Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception shown on listing new show resulting in societies not being added to the show #648

Open
GKFX opened this issue Apr 29, 2019 · 2 comments

Comments

Projects
None yet
1 participant
@GKFX
Copy link
Member

commented Apr 29, 2019

https://sentry.io/organizations/camdram-webteam/issues/1003710895/?project=1273126&referrer=github_plugin

InvalidArgumentException: Field "slug" is not a valid field of the entity "Acts\CamdramBundle\Entity\Show" in PreUpdateEventArgs.
  File "src/Acts/CamdramBundle/EventListener/ShowListener.php", line 165, in manageSlugChange
    $newSlug = $slugRepo->findOneBySlug($event->getNewValue("slug"));
  File "src/Acts/CamdramBundle/EventListener/ShowListener.php", line 68, in preUpdate
    $this->manageSlugChange($show, $event);
  File "src/Acts/CamdramBundle/Controller/AbstractRestController.php", line 145, in postAction
    $em->flush();
  File "src/Acts/CamdramBundle/Controller/ShowController.php", line 114, in postAction
    return parent::postAction($request);
  File "web/app.php", line 28
    $response = $kernel->handle($request);
...
(16 additional frame(s) were not displayed)

@GKFX GKFX self-assigned this Apr 29, 2019

@GKFX

This comment has been minimized.

Copy link
Member Author

commented May 3, 2019

Closing on the assumption that this is some sort of artefact of the release process. I can't reproduce this, it hasn't happened again, and reading both our and Doctrine's source code suggests that it's logically impossible for this to happen. Specifically,

if ($event->hasChangedField('slug')) {

checks that the slug field is present in an array and
$newSlug = $slugRepo->findOneBySlug($event->getNewValue("slug"));

retrieves the value.

@GKFX GKFX closed this May 3, 2019

@GKFX GKFX added irreproducible and removed regression labels May 3, 2019

@GKFX GKFX reopened this May 7, 2019

@GKFX GKFX removed the irreproducible label May 7, 2019

@GKFX

This comment has been minimized.

Copy link
Member Author

commented May 9, 2019

Clearly this is a) possible and b) not related to the release in any way as it has recurred. Only occurs when listing shows which should be approved automatically as the user is an admin of the society, doesn't occur if a site admin lists a show with a society, but does happen if a site admin edits one of the affected shows and tries to add the missing society back in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.