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

PageRoute Lava Filter - throws exception if used in context of a System Communication #5818

Open
2 tasks done
stanalyst opened this issue Apr 2, 2024 · 0 comments
Open
2 tasks done
Labels
Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@stanalyst
Copy link

Description

Trying to use the PageRoute filter to build a link inside of a system communication - it throws an exception when that communication is triggered: "Lava Error: Object reference not set to an instance of an object."
BUT ... strangely if that same system communication is sent via a workflow action instead - it doesn't throw the exception and the results are as desired.

Actual Behavior

Throws the exception: "Lava Error: Object reference not set to an instance of an object." whenever the PageRoute filter is used inside a system communication.

Expected Behavior

Should be able to use this filter inside the message body of a system communication to build desired link without an exception.

Steps to Reproduce

  • setup a new system communication place the following code into the message body (The page id and person id are from rock demo site ... replace them as needed).
    {{ 93 | PageRoute:'PersonId=1' }}
  • setup a method for triggering this system communication (other than from a workflow action) ... it has to be something that runs unattended (i.e. without the user interface). I used a system job to send attendance reminders and limited it to just a single test group - then manually ran the job.
  • open the email that was and note the lava exception "Lava Error: Object reference not set to an instance of an object." OR in the case of the demo site since it doesn't have SMTP setup - go to the exceptions log and see the same lava error.
    image

NOTE: You can put this code {{ 93 | PageRoute:'PersonId=1' }} into an HTML block on a page (or in lava tester) ... and you should get /person/1 output (or something similar)

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug or enhancement is already reported.
  • Try to reproduce the problem on a fresh install or on the demo site.

Rock Version

1.16.2.1

Client Culture Setting

en-US

@sparkdevnetwork-service sparkdevnetwork-service added Type: Bug Confirmed bugs or reports that are very likely to be bugs. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

2 participants