TV not connected to FRED front end

My blog_image TV is not connected to FRED front end.

I am following this guide: https://modxcookbook.com/add-ons/fred/simple-image-tv.html

And have these properties for my TV blog_image:

  • fred: yes
  • fred.type: image
  • fred.media.source: 2 (uploads media source)

The Blog post template is added to FRED theme templates. but on front-end I do not see the TV edit option under settings.

Did you use the string “yes” with type = Textfield (which is wrong)?
It should be “1” (type “Textfield”) or “Yes” (type “Yes/No”).

Changed it to this:

Still does not work.

And this TV is assigned to the correct template?


What versions of Fred and MODX are you using?

TV is connected to template blog-detail-page
MODX 3.0.5-pl (MODX Cloud)
FRED 3.0.2-pl (latest)

Do I somehow need to ‘activate’ the property set? (I don’t right?

I had trouble getting this working too. In the end this seems to have done it for me:

Yes the setting for the media source should be “fred.mediaSource” (instead of “fred.media.source”) with the name of the media source as the value (instead of the ID). But this doesn’t explain why you can’t see the TV on the front-end during editing.

Thanks, I adjusted it to this but still no go… strange.

Maybe it’s a permissions issue. Check the permission fred_settings_tvs for your user.

User is SUDO admin…
Still no go.


Added the FRED acces policy also to admin ACL.

Open the developer tools in the browser and go to the “Network” tab.
Then open the page on the front-end (to edit it with Fred).

There should be a request like this assets/components/fred/web/endpoints/ajax.php?modx=3&action=load-content&id=52 with the “action” = load-content.
In the response JSON, is there some content under “data” → “tvs”?

No, its empty:

{
“data”: {
“pageSettings”: {
“pagetitle”: “Sunt sit in quis cupidatat mollit”,
“longtitle”: “”,
“description”: “”,
“introtext”: “Cupidatat minim id magna ipsum sint dolor qui. Sit in quis cupidatat mollit aute velit.”,
“menutitle”: “”,
“alias”: “sunt-sit-in-quis-cupidatat-mollit”,
“published”: true,
“deleted”: false,
“hidemenu”: true,
“menuindex”: 0,
“publishedon”: 1695307260,
“publishon”: 0,
“unpublishon”: 0,
“tagger”: ,
“tvs”: {}
},
“data”: {
“content”: ,
“fingerprint”: “be21a4060826c313a7c588a8c6397b31afe6bd7c”
},
“plugins”: {},
“elements”: ,
“tagger”: ,
“tvs”: ,
“fingerprint”: “be21a4060826c313a7c588a8c6397b31afe6bd7c”
}
}

This is really weird.

What the code does is to get all TVs from the resource (line 85), read their properties (line 90) and add them to the output if the property “fred” exists and is equal to 1 (line 92).

So either you’re using the wrong template, the TV is not assigned to the template or the property “fred” is wrong.

Maybe verify that there aren’t any (trailing) space characters in the “fred” TV property name.

There must be a bug somehow…

Fresh new site on MODX Cloud. All the latest versions.

Made TV called image assigned it to the BaseTemplate:

Set the Property Set (double checked for spaces):

TV is assigned to template:

Template is active for FRED:

Still no TV on FRED:

response JSON still empty for TV:

{
    "data": {
        "pageSettings": {
            "pagetitle": "Home",
            "longtitle": "Congratulations!",
            "description": "",
            "introtext": "",
            "menutitle": "",
            "alias": "index",
            "published": true,
            "deleted": false,
            "hidemenu": false,
            "menuindex": 0,
            "publishedon": 0,
            "publishon": 0,
            "unpublishon": 0,
            "tagger": [],
            "tvs": {}
        },
        "data": {
            "content": [
                {
                    "widget": "8a58aa49-c77d-476b-af35-9d26337c087b",
                    "values": {
                        "header": {
                            "_raw": {
                                "_value": "\n       Quisque ullamcorper neque\n      "
                            }
                        },
                        "data-item 0": {
                            "_raw": {
                                "_value": "\n                Data item\n              "
                            }
                        },
                        "data-value 0": {
                            "_raw": {
                                "_value": "\n                100\n              "
                            }
                        },
                        "rte-content": {
                            "_raw": {
                                "_value": "\n          <p>\n            Aliquet nec orci mattis amet quisque ullamcorper neque, nibh\n            sem. At arcu, sit dui mi, nibh dui, diam eget aliquam. Quisque\n            id at vitae feugiat egestas ac. Diam nulla orci at in viverra\n            scelerisque eget. Eleifend egestas fringilla sapien.\n          <\/p>\n        "
                            }
                        }
                    },
                    "pluginsData": [],
                    "settings": [],
                    "children": [],
                    "elId": "fred_e168134_b3zaqq2jal"
                },
                {
                    "widget": "63d592af-7937-4247-b756-9d26337c075f",
                    "values": {
                        "something-unique": {
                            "_raw": {
                                "_value": "\/assets\/components\/any-screen-size-start\/uploads\/anne-laure-p-wVmz75D5ztk-unsplash.jpg"
                            }
                        }
                    },
                    "pluginsData": [],
                    "settings": {
                        "cta_link": {
                            "id": 2,
                            "url": "index.php?id=2"
                        },
                        "cta_text": "Read more",
                        "cta_2_link": {
                            "id": 2,
                            "url": "index.php?id=2"
                        },
                        "cta_2_text": "Read more"
                    },
                    "children": [],
                    "elId": "fred_28e2812_xl90z7t2cec"
                },
                {
                    "widget": "98a63e4d-0dc2-4caa-a93f-9d26337c07e6",
                    "values": {
                        "header": {
                            "_raw": {
                                "_value": "\n       Quisque ullamcorper neque\n      "
                            }
                        },
                        "data-item 0": {
                            "_raw": {
                                "_value": "\n                Data item\n              "
                            }
                        },
                        "data-value 0": {
                            "_raw": {
                                "_value": "\n                100\n              "
                            }
                        },
                        "rte-content": {
                            "_raw": {
                                "_value": "\n          <p>\n            Aliquet nec orci mattis amet quisque ullamcorper neque, nibh\n            sem. At arcu, sit dui mi, nibh dui, diam eget aliquam. Quisque\n            id at vitae feugiat egestas ac. Diam nulla orci at in viverra\n            scelerisque eget. Eleifend egestas fringilla sapien.\n          <\/p>\n        "
                            }
                        }
                    },
                    "pluginsData": [],
                    "settings": [],
                    "children": [],
                    "elId": "fred_a945083_ttjalnxjzg"
                }
            ],
            "fingerprint": "7f7d6012ae9a87b60b49dfbe368767f2e6a3a2e3"
        },
        "plugins": {},
        "elements": {
            "8a58aa49-c77d-476b-af35-9d26337c087b": [],
            "63d592af-7937-4247-b756-9d26337c075f": [],
            "98a63e4d-0dc2-4caa-a93f-9d26337c07e6": []
        },
        "tagger": [],
        "tvs": [],
        "fingerprint": "7f7d6012ae9a87b60b49dfbe368767f2e6a3a2e3"
    }
}

Correction

I made a 100% new cloud (realized I installed my package on the test site before) and here it works…

Something in my DEV site must have messed things up a bit.

Will move my DEV to a new site I guess. Strange.

Found it!
It only works if I set the properties to the default Property Set

Or am I missing a way to activate my custom (anybase) Property Set?

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.