Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25826

Information collector: collected information is wrong if it was submitted in two browser windows at the same time

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: High High
    • Customer request
    • 5.4.6
    • Legacy stack
    • None

    Description

      If the same information collection form is open in two separate browser windows of the same browser type (Chrome, FF, etc), different information is filled in in both browser windows, and then submitted at the same time (or as close as possible to that), the same information will be collected in both browser windows, when it should be different as to reflect the different information that was submitted.

      A typical user case scenario occurs when user 1 at location 1 submits information on an information collection form in a specific browser (Chrome, FF, etc), and user 2 at location 2 submits different information on the same form and on a browser of the same type at the same time. The collected information should be different on both browsers, but it's the same.

      For testing purposes, a simple way to simulate the scenario described above is to have the same user to submit different information on two separate browser tabs of the same browser at the same time - or as close to that as possible. In line with that, please refer to the following instructions on how to verify this issue.

      Steps to reproduce:

      1. On the admin interface, create a new class:

      Name: 5199
      Identifier: 5199
      

      Add the following attributes:

      Fieldtype: Textline
      Name: Name
      Attribute: name
      
      Fieldtype: Textline
      Name: Subject
      Attribute: subject
      Required: Checked
      Information collector: Checked
      

      2. Create a new object for the new class, with a suitable "Name" field e.g. "Home/Tests/TestObject";
      3. Create a new "/ezpublish_legacy/settings/override/override.ini.append.php" file:

      	
      <?php /* #?ini charset="utf-8"?
      
      [infocollector_test]
      Source=node/view/full.tpl
      MatchFile=infocollector/collector_view.tpl
      Subdir=templates
      Match[class_identifier]=5199
      
      */ ?>
      

      4. Create a new "/ezpublish_legacy/extension/ezdemo/design/ezdemo/override/templates/infocollector/collector_view.tpl" file:

      	
      <div class="content-view-full">
          <div class="attribute-header">
              <h1>{$node.name|wash()}</h1>
          </div>
          <form action="/content/action" method="POST">
              {foreach $node.object.contentobject_attributes as $attribute}
              <div>
                  {attribute_view_gui attribute=$attribute}
              </div>
              {/foreach}
              <input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
              <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
              <input type="submit" name="ActionCollectInformation" value="submit" />
          </form>
      </div>
      

      5. Clear legacy cache;
      6. On two separate browser windows of the same browser (Chrome, FF, etc), go to a suitable frontend siteaccess as anonymous, and navigate to the object defined in step #2 e.g. http://example.com/Tests/TestObject;
      7. Fill in different test details in both browser windows. Used "test1" in window 1, and "test2" in window 2;
      8. Submit the information on both windows at the same time, or as close to that as possible. Both browser windows will display the same collected information, when it should be different.

      Note: although, when this bug occurs, both browser windows will display the same submitted information, the information what is actually stored is correct. This can be verified by logging in to the admin siteaccess, then going to the "Setup" tab, and then inspecting the data on the "Collected information" section. Therefore, please regard this as a visual bug.

      Attachments

        1. 5199-1.0-1.ezpkg
          2 kB
        2. collector_view.tpl
          0.6 kB
        3. override.ini.append.php
          0.2 kB

        Activity

          People

            Unassigned Unassigned
            nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: