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

Error when viewing the campaign #323

Closed
billymedia opened this issue Aug 30, 2022 · 5 comments
Closed

Error when viewing the campaign #323

billymedia opened this issue Aug 30, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@billymedia
Copy link

When i am editing a campaign, and i click "View" to preview it, i get the following error:

Getting unknown property: putyourlightson\campaign\elements\CampaignElement::section

Even when i empty my template just to see if it will return a blank page, i still get the error.

Clicking on preview returns a blank page. With or without the template code in place.

Craft CMS 3.7.46
Plugin 1.23.4

@billymedia billymedia added the bug Something isn't working label Aug 30, 2022
@bencroker
Copy link
Collaborator

Are you perhaps calling campaign.section or something similar in your campaign's template? If that's the case, then campaigns don't have sections, which is likely to be the cause of the error.

@billymedia
Copy link
Author

I am not using any code other than html, it also throws the error when i emptied my template, so no code at all.

@bencroker
Copy link
Collaborator

Hmm, can you show me the full error stack trace?

@billymedia
Copy link
Author

I just noticed that the stack trace mentioned a custom plugin, so it might be a naming conflict of some sort. I'll dig a little bit more this end.

@bencroker
Copy link
Collaborator

Right, it looks like you have a "Brands" plugin that is calling the section on the campaign element, which doesn't exist.

#1 /Users/bp/Sites/fb-hub-v3-dev/plugins/brands/src/Brands.php(293): craft\base\Element->__get('section')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants