Issue with Media where new "Apply" button present

Hi

I have just upgraded our Xibo server to 1.7.2 which is great thanks, but have come across an issues when editing media from a regional time line.

When in the Layout Design mode, i go to the edit timeline option which then loads up the “Region Time” for that region, I then go and edit a media type say “Text” when in the edit window the new “Apply” button is present. If I use the Apply button after making some changes this works fine, however if I then go to exit the media by using normal Save button either after using the Apply button at first, or even just using the save button instead of getting returned to the “Region Timeline” menu for what I was editing I get dumped back at the Layout Design mode instead which is a right pain when having to do multiple edit per Region Timeline.

If you use the cancel button you get returned to the Region Timeline as expected. Other media items like image where the Apply button doesn’t exist the Save button seems to behave as expected and returns me to this Region Timeline list.

Odd, the new button shouldn’t have effected the operation of the existing save button. Will have to investigate further.

Yeah I was thinking it was a bit odd to. Have tried in Chrome & Firefox in both Windows and Ubuntu and all are yielding the same results.

Have even re-installed the server twice just to make sure it wasn’t a bad install.

hhmmmmm, been going through this again and found out that in the forecast.io module It does infact load back up the Regional Timeline ok, when the other forms where this is not present this does not happen.

This has lead me to look at the code changes, and noticed from this commit

link 1

that only one line of code has been added to the forecast.io module, but when you look at the other commits to complete the Apply button config

link2

there is refreshpreview added which is not in the forecast.io module code.

Now if I disable this particular line it now actually loads up the Regional Timeline again.

Any thought’s Dan please? I can’t see how to fix this, if you suggest a fix i can sort out a commit if needed…

Thanks

Andy

link 1 https://github.com/dasgarner/xibo-cms/commit/1d02caf31e7e26147643932a6510037c36af29e9

link 2 https://github.com/dasgarner/xibo-cms/commit/eba18fa899e957636d1e01c13609eee39326a840

Wouldn’t let me put these links in my last post due to being a “New” user

Hi Andy,

I’ll have to take a look, it might be that the refresh preview function is preventing further code from executing.

Cheers Dan thanks, I have tried to juggle the code around and move this piece of code to after the loadform & loadformuri responses thinking along a similar line but this made no effect in this circumstance.

Well, I am actually not sure what is happening there - the refresh preview function is being passed back as a callback to the javascript, executed and then causes an undefined error.

It can be fixed in xibo-cms.js by changing the linked line to eval(response.callBack);

Not sure what else that might break - I am thinking not much, you could try it and see?

Hi Dan

Changed that line on my install to match and yes it does seem to fix the issue, not seen it breaking anything on my install … yet

Just one question about reporting bugs etc, who actually should be opening these on github as an issue, yourself/alex or the end user or both?