modx-pro / Docs

Open Source documentation for MODX Revolution
https://docs.modx.pro
GNU General Public License v2.0
65 stars 125 forks source link

pdoPage doesn't display custom template variables #513

Closed pixelbyinch closed 4 years ago

pixelbyinch commented 4 years ago

Wonderful plugin, it's the best! I think I found a bug in pdoPage

Does not show Template Variables &element=pdoResources &includeTVs=newsDate &processTVs=newsDate

Work around &element=getResources &includeTVs=newsDate &processTVs=newsDate

Any way to fix the pdoPage to show custom template variables?

bezumkin commented 4 years ago

Do you really think that one of the most popular MODX extra could have such a bug for many years and nobody saw it, but you?

  1. pdoPage doesn't show anything, it is pagination snippet that split results of another snippet to pages. In your case it is pdoResources

  2. Try to list resources with empty tpl - it will show all available placeholders, including your TVs:

    [[!pdoPage?
    &element=`pdoResources`
    &includeTVs=`newsDate`
    &processTVs=`newsDate`
    &tpl=``
    ]]
  3. If you doesn't see something - use &showLog=1 to debug

pixelbyinch commented 4 years ago

No I don't think I am that brilliant or arrogant, just needed help. Thank you again for the quick reply using debug, the output shows blank entries. Took one more look at that specific to the TV. The site was migrated using GoRevo and the TV was a revolution "Date" TV. During the db conversion mysteriously the TV was set to "output" -> "unixtime". Now that I changed the TV back to a the "output" -> "date" it's working.

bezumkin commented 4 years ago

Glad to read it!