Hi,
I'm following the Modx tute on how to create a blog and am getting the error below
Notice: Undefined index: tag in D:\wamp\www\revo226b\core\cache\includes\elements\modsnippet\8.include.cache.php on line 44
Read more: Conversion Rate Library - Perth, Western Australia
Otherwise everything else is working ok. The page loads and pulls the content, but I still get the error.
Here's the call
<p>[[!getResourcesTag? &elementClass=`modSnippet` &element=`getResources` &tpl=`library-template` &parents=`2` &depth=`3` &limit=`5` &includeContent=`1` &includeTVs=`1` &showHidden=`0` &hideContainers=`1` &cache=`0` &pageVarKey=`page` ]] [[!+page.nav:notempty=`</p>
<div class="paging">
<ul class="pageList">[[!+page.nav]]</ul>
</div>
<p>`]]</p>
Can anyone tell me where I'm going wrong?
Thanks
[ed. note: markg last edited this post 13 years, 7 months ago.]
Content Creator and Copywriter
discuss.answer
Treigh,
Sorry, should have said I'm not using Articles. I'm following the original tute in the link.
I looked at Articles but it's not really what I'm after.
Articles doesn't do categories.
Anyway, it seems to have fixed itself. Working fine now.
[ed. note: markg last edited this post 13 years, 7 months ago.]
Content Creator and Copywriter
-
☆ A M B ☆
- 24,524 Posts
That's not really an error it's a notice. It means that the variable wasn't defined. It "fixed" itself later because such a variable became used. The snippet, snippet #8 in your installation, needs to be fixed to check for the existence of the variable before trying to do something with it.
A good example is illustrated here
http://notesofgenius.com/how-fix-php-notice-undefined-index/
Which snippet is #8? (the IDs are in parentheses next to the name in the Elements tree).
Some where around line 40 (the line numbers are often high by about 7), there's a variable: $tag that's used without being declared before that line. Most often, it's something like this:
that should be: