Question

I have a problem with TYPO3 which I encountered several times now.

If i fetch an object with the TYPO3 CONTENT Object i have the possibility to render the fields with the renderObj... So far so good...

But if i try to fetch an object which i fetched already before i dont get any response..

Following setup:

temp.current = COA
temp.current {

    10 = CONTENT
    10 {
        table = pages
        select {
            pidInList = 22
            max = 1
        }

        renderObj = COA
        renderObj {

            10 = CONTENT
            10 {

                table = tt_content
                select {
                    pidInList.field = uid
                    where = colPos = 9
                    max = 1
                    languageField = sys_language_uid
                }

                renderObj = COA
                renderObj {

                    5 = TEXT
                    5 {
                        value = here
                        typolink {
                            parameter.field = pid
                            title {
                                cObject = RECORDS
                                cObject {
                                    tables = pages
                                    source.field = pid
                                    conf.pages = TEXT
                                    conf.pages.field = title
                                }
                            }
                        }
                    }

                    20 = IMAGE
                    20 {

                        required = 1
                        file{
                            import = uploads/pics/
                            import.field = image
                            import.data = levelmedia: -1, slide
                            import.listNum = 0

                            width = 300c
                            height = 300c
                        }

                        titleText.field = titleText // altText
                        altText.field = altText // titleText

                        imageLinkWrap = 1
                        imageLinkWrap {
                            enable = 1

                            typolink {
                                parameter.data = field:pid
                            }
                        }
                    }
                }
            }

        }
    }
}

This is my current setup which i need to get a current project... Whatever..

The important part is:

5 = TEXT
5 {
   value = here
   typolink {
      parameter.field = pid
      title {
         cObject = RECORDS
         cObject {
            tables = pages
            source.field = pid
            conf.pages = TEXT
            conf.pages.field = title
         }
      }
   }
}

I've already debugged the result of source... The value is 92, which is the correct uid from the page from where I need the title field...

Also I know that the code should be okay, because I use this snippet on many pages.

I think the problem is, that I try to fetch a content which i already fetched before..

Right here:

temp.current = COA
temp.current {

    10 = CONTENT
    10 {
        table = pages
        select {
            pidInList = 22
            max = 1
        }
    }
}

Many thanks!

// EDIT

I found a very good solution for my problem..

5 = TEXT
5 {
    value = hier
    typolink {
    parameter.field = pid
        title.cObject = TEXT
        title.cObject {
            data.dataWrap = DB:pages:{field:pid}:title
        }
    }
}
Was it helpful?

Solution 2

According to http://forge.typo3.org/issues/20541 you are right and this has not been viewed as a bug but a feature ("recursion prevention").

OTHER TIPS

I found a solution!

5 = TEXT
5 {
    value = hier
    typolink {
        parameter.field = pid
        title.cObject = TEXT
        title.cObject {
            data.dataWrap = DB:pages:{field:pid}:title
        }
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top