[FLOW3-general] Fluid forms: strange behaviour after update to FLOW3 1.1 rc2

Martin Keck keck at bloompark.de
Wed Aug 1 16:33:09 CEST 2012


Hi guys,

I have a strange behaviour of my Fluid Forms since updating my FLOW3 1.1 beta2 install to 1.1.0-rc2.
Looks like a bug to me, but I'm not quite sure. Can anyone confirm this bug and/or show a solution?

Consider the following:

I have a list of contents, for every content there is a form created. When submitting the form some other database table will be updated with a reference to the specific content. This worked great with beta2, but with rc-2 the reference to the content isn't set correctly. Always the same flow3_persistence_identifier - i.e. the newest content entry in db - is appended to the forms action attribute and therefore the db-reference is wrong, too, after submitting the form. When switching back to beta2 everything's ok again.

Here's the for loop for the content list and with the forms:

<f:for each="{contents}" as="content" iteration="iterator">
...
<div class="modal hide share-modal" id="myModal-{iterator.index}">
    <f:form controller="Share" action="new" arguments="{content: content}">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">×</button>
            <h3>Über Facebook teilen</h3>
        </div>
        <div class="modal-body">
            <h4>{content.title} <small>{content.subtitle}</small></h4>
            <p>{content.short_description}</p>
            <h4>Deine Nachricht:</h4>
            <f:form.textarea property="message" rows="3" cols="30" name="message" />
        </div>
        <div class="modal-footer">
            <a href="#" class="btn" data-dismiss="modal">Abbrechen</a>
            <f:form.submit value="Jetzt auf Facebook posten" class="btn btn-primary share-btn" />
        </div>
    </f:form>
</div>
...
</f:for>


That's a part of the database table of the contents:

flow3_persistence_identifier
48cab51b-51ef-479f-a2df-b2698749d60a	--> first content element
a49f0e15-67ed-4807-a5f8-bd0fb25c90d0	--> second, newer content element


That's how the HTML output looks like:

...
<form action="share/new?__csrfToken=d7a85ddb8750c1aac76b9ed3a7d56236&amp;content%5B__identity%5D=a49f0e15-67ed-4807-a5f8-bd0fb25c90d0" method="post">
..
<form action="share/new?__csrfToken=d7a85ddb8750c1aac76b9ed3a7d56236&amp;content%5B__identity%5D=a49f0e15-67ed-4807-a5f8-bd0fb25c90d0" method="post">
..

As you can see for both forms the same value for content[identity] is set. 
But what's even stranger is the fact that besides of the identifier the output of the other content attributes is correct, e. g. {content.title}  outputs for every content the content-specific title (for example "Title 1", "Title 2").

It does not seem to be a caching issue, as I (force) flushed the cache for numerous times. 
But is probably something wrong with my <f:form> configuration? Did I miss a new configuration option for it since the newest FLOW3 release or what's the point???

Or lies the problem in this automatically generated hidden form element, which is also the same for both forms??
<input type="hidden" name="__referrer[arguments]" value="YTowOnt9eccd1e6b8186e1f21d83f49df6c6f8eb5589b662" />
<input type="hidden" name="__referrer[arguments]" value="YTowOnt9eccd1e6b8186e1f21d83f49df6c6f8eb5589b662" />


Any hint and help is highly appreciated.

Thank you very much in advance!
Martin





More information about the FLOW3-general mailing list