Copy Layout error in editing the content type and Embedded OR Ticker FEED / RSS - Windows Server Only

Bug #1321512 reported by Laercio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xibo
Fix Released
Undecided
Dan Garner

Bug Description

Copy Layout error in editing the content type and Embedded Ticker

When performing a copy layout, marking replicate content or not identified the same problem.

The layout is copied successfully, but the content type or Embedded Ticker lose the reference edition. Always displays the first item in the list in the edit screen.

Related branches

Laercio (laercionit)
summary: - Copy Layout error in editing the content type and Embedded Ticker
+ Copy Layout error in editing the content type and Embedded OR Ticker
+ FEED / RSS
Revision history for this message
Laercio (laercionit) wrote : Re: Copy Layout error in editing the content type and Embedded OR Ticker FEED / RSS

Anyone else identifies the same problem?

The only way to solve is identified exclude (feeds / embeded) and raise them to click novamente.Assim edit content references are maintained.

Revision history for this message
Laercio (laercionit) wrote :

Anyone else identifies the same problem?

The only way to solve it is to delete identified (feeds / embeded) and insert again. Thus references content editing are maintained.

The timeline behind all of the items, but for some reason keeps references only the first content item.

If you have 5 or embeded Feeds, copying the layout appeared in the right amount, but when editing, where content is presented first.

Revision history for this message
Dan Garner (dangarner) wrote :

Sorry, but I don't understand the problem. Can you list out the steps to re-create?

Changed in xibo:
status: New → Incomplete
Revision history for this message
Laercio (laercionit) wrote :

Process for generating bug

Create a layout
Create a region
In the region place the following items embeded type, one for each item below.

item 1
<iframe AllowTransparency = "true" frameborder = "0" src = "http://tempo.suatv.com.br/WidgetCidade.aspx?guid=7d960eca-543a-4bdb-bed4-668d4b939fad" style = "height: 300px; width: 170px; border: 0; "> </ iframe>

item 2
<iframe AllowTransparency = "true" frameborder = "0" src = "http://tempo.suatv.com.br/WidgetCidade.aspx?guid=303cab01-2a62-403f-b7c7-943dcbe77421" style = "height: 300px; width: 170px; border: 0; "> </ iframe>

item 3
<iframe AllowTransparency = "true" frameborder = "0" src = "http://tempo.suatv.com.br/WidgetCidade.aspx?guid=81e6b60c-30b6-4577-976d-518e1e868289" style = "height: 300px; width: 170px; border: 0; "> </ iframe>

item 4
<iframe AllowTransparency = "true" frameborder = "0" src = "http://tempo.suatv.com.br/WidgetCidade.aspx?guid=380f4e48-ea02-4c71-a30f-0cac437061b4" style = "height: 300px; width: 170px; border: 0; "> </ iframe>

Layout Test to see if the content embeded this working.

Use the Copy Layout

Access to the region that has embeded codes.

You will see that the items were NOT copied correctly, but when scheduling the layout are displayed correctly ....

For my tests this bug happens in embeded type and ticker

Revision history for this message
Laercio (laercionit) wrote :
Revision history for this message
Laercio (laercionit) wrote :

After I informed the process above, you have the opportunity to validate that the bug exists?

Revision history for this message
Laercio (laercionit) wrote :

Hello,

Dan, you had the opportunity to confirm the error mentioned in the script tests I did?

Revision history for this message
Dan Garner (dangarner) wrote :

Sorry, but I am not sure what the problem is - what happens to the ticker / embedded content on copy?

Changed in xibo:
milestone: none → 1.7.0-alpha2
assignee: nobody → Dan Garner (dangarner)
Revision history for this message
Laercio (laercionit) wrote :

Dan, see the image of the timeline layout CLONE LayoutCopyError.jpg.
See the timeline of the original layout LayoutOriginal.jpg

The copy function works, the layout works perfectly copied.
The error when trying to edit this timeline clone layout.

See the pictures and understand, I did put the process so you can recreate the error.

Revision history for this message
Dan Garner (dangarner) wrote :

Hi Laercio, sorry my message wasn't clear... I understand what you say is happening, but I can't seem to recreate it following your instructions.

It is also hard to see how this could happen logically either - clearly it is happening, but I can't see how. Are you running a standard CMS?

Revision history for this message
Laercio (laercionit) wrote : Re: [Bug 1321512] Re: Copy Layout error in editing the content type and Embedded OR Ticker FEED / RSS

Dan, I will create layouts and demonstrate the problem in CMS Demo we
created last week.

Okay?

I'll try to recreate ...

Revision history for this message
Laercio (laercionit) wrote : Re: Copy Layout error in editing the content type and Embedded OR Ticker FEED / RSS

Dan, did the tests on the DEMO environment and could not recreate the problem.
In my environment the problem happens ....

Some guidance? My server is windows.

Changed in xibo:
status: Incomplete → Invalid
Revision history for this message
Laercio (laercionit) wrote :

Dan, did the tests and identified the problem, but not sure how to troubleshoot.

When I use the function key CopyLayout Media ID is the same on all items and embedded ticker.
Could you tell me which file should I check and the problem line of code?

 </script>]]></embedScript></raw>
                     </media><media id="8bc4e7f5a1f997ae549acd3607e857be" type="embedded" duration="30" lkid="" userId="3" schemaVersion="1">
                             <options><transparency>1</transparency><name>3</name></options>
                             <raw><embedHtml><![CDATA[<iframe AllowTransparency = "true" frameborder = "0" src = "http://tempo.suatv.com.br/WidgetCidade.aspx?guid=81e6b60c-30b6-4577-976d-518e1e868289" style = "height: 300px; width: 170px; border: 0; "> </ iframe>]]></embedHtml><embedScript><![CDATA[<script type="text/javascript">
 function EmbedInit()
 {
  // Init will be called when this page is loaded in the client.

  return;
 }
 </script>]]></embedScript></raw>
                     </media><media id="8bc4e7f5a1f997ae549acd3607e857be" type="embedded" duration="30" lkid="" userId="3" schemaVersion="1">
                             <options><transparency>1</transparency><name>4</name></options>
                             <raw><embedHtml><![CDATA[<iframe AllowTransparency = "true" frameborder = "0" src = "http://tempo.suatv.com.br/WidgetCidade.aspx?guid=380f4e48-ea02-4c71-a30f-0cac437061b4" style = "height: 300px; width: 170px; border: 0; "> </ iframe>]]></embedHtml><embedScript><![CDATA[<script type="text/javascript">
 function EmbedInit()
 {

Revision history for this message
Laercio (laercionit) wrote :

I looked at the file lib \ data \ layout.data.class.php 518 line, this identically to the original, nothing is different, do not know for what reason this is happening.

NOTE: This problem happens to me since version 1.4.2. Is it something related to windows environment?

Revision history for this message
Laercio (laercionit) wrote :

LogId
Data
Page
Function
Mensagem
150 2014-10-13 23:13:36 LayoutRegionGroupSecurity Copy IN
149 2014-10-13 23:13:36 CampaignGroupSecurity Copy OUT
148 2014-10-13 23:13:36 CampaignGroupSecurity Copy IN
144 2014-10-13 23:13:36 layout Copy Finished looping through media nodes
143 2014-10-13 23:13:36 LayoutMediaGroupSecurity Copy IN
142 2014-10-13 23:13:36 layout Copy Checking to see if embedded is RegionSpecific
141 2014-10-13 23:13:36 layout Copy Media embedded node found with id 0
140 2014-10-13 23:13:36 LayoutMediaGroupSecurity Copy IN
139 2014-10-13 23:13:36 layout Copy Checking to see if embedded is RegionSpecific
138 2014-10-13 23:13:36 layout Copy Media embedded node found with id 0
137 2014-10-13 23:13:36 LayoutMediaGroupSecurity Copy IN
136 2014-10-13 23:13:36 layout Copy Checking to see if embedded is RegionSpecific
135 2014-10-13 23:13:36 layout Copy Media embedded node found with id 0
134 2014-10-13 23:13:36 LayoutMediaGroupSecurity Copy IN
133 2014-10-13 23:13:36 layout Copy Checking to see if embedded is RegionSpecific
132 2014-10-13 23:13:36 layout Copy Media embedded node found with id 73
131 2014-10-13 23:13:36 layout Copy About to loop through media nodes

Revision history for this message
Laercio (laercionit) wrote :

Dan, this error appears in this function, but unfortunately I can not reproduce the test environment we create.
All Media ID embedded given the same ID, the same problem occurs in the ticker. As I understand this error when generating a new ID and save the XML column.

// If this is a non region specific type, then move on
                if ($this->IsRegionSpecific($type))
                {
                    // Generate a new media id
                    $newMediaId = md5(uniqid());

                    $mediaNode->setAttribute('id', $newMediaId);

Revision history for this message
Laercio (laercionit) wrote :

Dan, I just try to install a new environment.
I did the same tests using version 1.6.4

The same problem happened, is something related functionality in my server environment.

If you have possibility to check:

user: xibo
Password: xibo
url: //admin.suatv.com.br/164/

Do see the items in the timeline layout (default layout) and make a copy.

Revision history for this message
Laercio (laercionit) wrote :
Revision history for this message
Laercio (laercionit) wrote :

Dan, I think it may be related to the topic: https://www.drupal.org/node/2045699

My opinion is that it is a bug that exists only in windows environment. Therefore when PHP calls the md5 (uniqid ()); all appear with the same ID Media.

Revision history for this message
Laercio (laercionit) wrote :

Dan, the problem was solved by adjusting the function below.

I can not validate if there was a difference for the UNIX environment, but for windows solved.

   // Generate a new media id
                     $ newMediaId = md5 (uniqid (time (), TRUE));

Revision history for this message
Laercio (laercionit) wrote :

both worked

$ newMediaId = md5 (uniqid (time (), TRUE));

or

$ newMediaId = md5 (uniqid ($ _ SERVER ['REQUEST_TIME'], true));

Changed in xibo:
status: Invalid → Confirmed
summary: Copy Layout error in editing the content type and Embedded OR Ticker
- FEED / RSS
+ FEED / RSS - Windows Server Only
Revision history for this message
Dan Garner (dangarner) wrote :

Ah, i see... that is very interesting! So the problem appears to be that windows doesn't generate a uniqueid each time when using the uniqueid function.

In that case, either of your solutions would appear to work fine - there is a built in Kit method that could be used instead

Kit::uniqueId();

I will target and fix this for 1.7.0-alpha2.

Thanks for the debug while I was asleep! :)

Dan Garner (dangarner)
Changed in xibo:
status: Confirmed → Triaged
status: Triaged → Fix Committed
Revision history for this message
Laercio (laercionit) wrote :

Dan, I have to change the code modification that I made?

$ NewMediaId = md5 (uniqid ($ _ SERVER ['REQUEST_TIME'], true));

for your solution

Kit :: uniqueId ();

Revision history for this message
Dan Garner (dangarner) wrote :

You can keep your solution - they are essentially the same.

Revision history for this message
Laercio (laercionit) wrote :

Ok Dan, I tried make the change to your code.
Did not work for me. Can not even finish the copy of the layout.

Revision history for this message
Dan Garner (dangarner) wrote :

you can revert to your solution - lets not make additional work for ourselves :-)

The code is tested and working here.

Thanks,
Dan

Revision history for this message
Laercio (laercionit) wrote :

Dan, sorry, I know that this issue apparently resolved with the modification that I made. But with the modification that you made ​​not to operate the copy of the layout.

The process does not even make a copy with the previous error. Simply does not finish copying.

Revision history for this message
Dan Garner (dangarner) wrote :
Revision history for this message
Laercio (laercionit) wrote :

Dan realized that the changes identified in the related files:

http://bazaar.launchpad.net/~dangarner/xibo/server-170-alpha2/revision/374
Making these changes only the copy process did not work.

I saw the link (http://bazaar.launchpad.net/~dangarner/xibo/server-170-alpha2/view/head:/server/lib/data/layout.data.class.php#L602 ) Contains more changes than just the ones mentioned:

$ newMediaId = md5 (uniqid ()) = >>>> Kit :: uniqueId ();

Revision history for this message
Dan Garner (dangarner) wrote :

Perhaps you can leave your own change in place for your 1.6 installations and then take the entire 1.7 when it is ready.

If you have doubts that my change works could test in the entire 1.7 alpha2 branch.

Revision history for this message
Laercio (laercionit) wrote :

Ok Dan, I will keep my mod to version 1.7

But it was understood only with the change of the work function. Looking at the code I saw that there were more changes than just the line you mentioned.

What you need to test or help, just ask ....

Dan Garner (dangarner)
Changed in xibo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.