Anyone got the &editorpageid and form rendering on a different page working? Documentation doesn’t really say much about it, just "... you must have correct FDM call on this page.". And that ’correct’ FDM call would be? Everything looks fine on the debug output, I can’t find the problem.
I currently use a call like this on my editor page:
[[FDM? &eform_tpl=`productFdmForm` &eform_formid=`productEditForm` &model=`10` &parent=`5` &debug=`all` &disableadd=`1` &disableedit=`1` &disableunpublish=`1` &disablepublish=`1` &disabledelete=`1` ]
I don’t want any buttons to show there, it’s just an editor page. The FDM call leading to my editor is simply:
[[FDM? &editorpageid=`18` &disableadd=`1` ]]
Also, made a quick change to tvfields snippet. I made it look for FDM docid in session variables. This is necessary for example in my case as I want the editor page apart. Change the first few lines to look like this:
if ( isset($_SESSION['fdm']['id']) )
$docid = $_SESSION['fdm']['id'];
$docid = isset( $docid ) ? $docid : $modx->documentIdentifier;
It’s probably not the most elegant solution but seems to be working for me. Now I just need to get FDM working correctly, or make myself understand how FDM works
- Osku
UPDATE!
Solved - Parameters on both of the FDM calls have to be exactly the same, because the md5 hash (seen on the urls), is generated from parameters string. Is this check really necessary?
For those who still don’t know what I’m talking about, FDM generates urls like...
http://domain.tld/fdm/product?fdmaction=edit15c9abfc1187bd7a1d31ba70621da12e&fdmid=10
... where fdmaction is composed of the actual action name and an md5 hash generated from FDM call parameters. Before rendering the editor form, FDM checks if the current FDM call md5 matches the one given in the url, + some action name. If not, nothing shows up. So a quick fix is: make sure your two fdm calls have exactly the same parameters.