Skip to main content

Questions tagged [null]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

Everything comes null when I try to filter entries by category - Craftcms 3

There's an issue when I filtering by categories but everything comes null, I was debugging code but all the entries has the same problem! But I don't know why does this happens? The entry comes well ...
EdisonJS's user avatar
1 vote
1 answer

Macro for entry loop causing 'null' variable template error

I am new to the concept of Twig templates and I can’t get it right from the documentation … What I am trying to achieve is to have a reusable Blogroll snippet that outputs entries in different ...
Tobias S.'s user avatar
  • 117
1 vote
1 answer

How to check for a value OR NULL on custom enddate field using yii syntax when calling entries?

I have a section of 'deals/coupons' with custom startDate and endDate. These are needed so the client can load up a bunch of deals but only have them render to the page when a particular deal is '...
FattyBeardFace's user avatar
1 vote
1 answer

craft.request.getParam('entryId') returns null on edit page of an entry

I have a plugin that's loaded on the edit page of an entry. Whenever I open the entry edit page, I would like to retrieve the id of this particular entry. I've tried this: {% set someId = craft....
iNalgiev's user avatar
1 vote
1 answer

Template variables from active record on NULL value

I have a template variable thus public function twitterAccounts() { return craft()->myPlugin->getAllAccounts(); //Craft::dd(craft()->myPlugin->getAllAccounts()); } it calls the ...
billythekid's user avatar
1 vote
1 answer

Best way to deal with Impossible to access an attribute ("isEditable") on a NULL variable ("")

I've had this issue a few times & wanted to know if there is maybe a better way to deal with the following issue: Say I have this if on a page: {% if entry.isEditable %} <a href="{{ entry....
joe's user avatar
  • 449
13 votes
2 answers

What's the difference between "is defined" and "is not null"?

{% if var is defined %} and {% if var is not null %} Is there a difference in usage of them?
nicael's user avatar
  • 2,382