Skip to main content

Getting an "use of deprecated value generation method" error upon generation

Comments

5 comments

  • Zendesk API User
    Author: bIT_sosswald - 4/13/2017 6:54

    Hi Christoph,

    try something like this for your list. We had the same error in the generation and it seems that you have to use ".values" in the $CMS_FOR(x,y)$ statement and then access the single elements by its FormData. (Or if you have other elements in your list in the way the elements want to be accessed. :smileywink:)

    $CMS_FOR(for_tool, st_needed_tools.values)$

        $CMS_RENDER(template: "ft_tool_link",   

                    ft_link: for_tool.formData.tt_link,

                    ft_text: for_tool.formData.tt_name)$

    $CMS_END_FOR$

    Greetings

    Sandro

    0
  • Zendesk API User
    Author: thmarx - 4/27/2017 12:40

    Hello Christoph,   

    do you need further help or did Sandro's reply already help you? If so, it would be great if you marked

    his reply as "correct answer" so that other community users find the solution easily. If you have

    already found a solution by yourself, it would be very kind of you, if you posted it here.   

    Best regards 

    Thorsten

    0
  • Zendesk API User
    Author: matthiasforberg - 6/26/2017 17:20

    I have the same problem: in the generation some warnings occur which say "use of deprecated value generation method for an index editor". But in the preview the pages do not show any errors or warnings. The template contains two CMS_FOR loops and I don't even know, which one is the deprecated one - or both?!

    The .values statement doesn't work either. Anyone who knows how to fix the problem? Or at least find it?

    Best regards

    Matthias

    0
  • Zendesk API User
    Author: mbergmann - 6/26/2017 17:49

    Hi Matthias,

    You could try using the template debugger with unchecked "preview" (settings tab). Another option is to - at least temporarily - enable debug mode by adding $CMS_SET(#global.debugMode, true)$ somewhere "before" the error. The latter will result in the log not only containing the warning message but also a "template stack trace".

    Michael

    0
  • Zendesk API User
    Author: Heiland - 8/3/2017 8:19

    Hi Matthias,

    this generation warning is caused by looping through a fs_index, like this:

    $CMS_FOR(formData, fs_index_var)$

         $-- It's irrelevant to do anything in here --$

    $CMS_END_FOR$

    To fix this do this:

    $CMS_FOR(dataset, fs_index_var.values)$

         $CMS_SET(formData, dataset.formData)$

         $-- proceed as before --$

    $CMS_END_FOR$

    Best regards,

    Manon

    0

Please sign in to leave a comment.