Mautic Community Forums

Bug when creating new email

Hi guys,



I believe this to be a bug in Mautic:


  1. Create a role with permission to create emails and then view, edit, delete publish own in emails, assets, forms, etc. For emails, also grant “view others” permission. Assume this role has full campaign permission for now.
  2. Login as an user with the above role
  3. Go to the campaign builder, add a send email step
  4. Click the “new email” button.



    You should see a popup displayed with an error:



    [2015-11-06 09:16:01] mautic.ERROR: Fatal: Call to a member function getId() on a non-object - in file /homepages/6/d416965206/htdocs/rightmarket/poc-mautic/app/bundles/FormBundle/Entity/FormRepository.php - at line 62 [] []



    A work around is to grant “view other” permissions in places like assets, forms, pages so that certain lines of the code is not hit.



    I believe the above behaviour is a bug and the desired behaviour should be that the new email window is shown but pages and assets in the right column is restricted according to the permission. If someone could confirm the desired behaviour then I would be more than happy to work on a fix.



    Thanks,



    Linh

Hi guys,

I believe this to be a bug in Mautic:

  1. Create a role with permission to create emails and then view, edit, delete publish own in emails, assets, forms, etc. For emails, also grant “view others” permission. Assume this role has full campaign permission for now.
  2. Login as an user with the above role
  3. Go to the campaign builder, add a send email step
  4. Click the “new email” button.

You should see a popup displayed with an error:

[2015-11-06 09:16:01] mautic.ERROR: Fatal: Call to a member function getId() on a non-object - in file /homepages/6/d416965206/htdocs/rightmarket/poc-mautic/app/bundles/FormBundle/Entity/FormRepository.php - at line 62 [] []

A work around is to grant “view other” permissions in places like assets, forms, pages so that certain lines of the code is not hit.

I believe the above behaviour is a bug and the desired behaviour should be that the new email window is shown but pages and assets in the right column is restricted according to the permission. If someone could confirm the desired behaviour then I would be more than happy to work on a fix.

Thanks,

Linh

Yes, this seems like a bug, could you please report it to https://github.com/mautic/mautic/issues (just copy-paste the text) so developers could track it? It may get lost here in the forum.