List having items removed after being set

List having items removed after being set.

I have workflows set up to create a list of images and then add those images to an “image_list” ( which is a data type that has a list of images )

Sometimes after the workflows have completed and the list of images has been added to the “image_list” some images are removed from the list.

So, when 13 images are initially added to the list, randomly some images may be removed so the list only has 12 or 9 or sometimes 6 images.

I’ve tried so many work arounds to get beyond this bug, but no matter what I do to set the list the problem persists and I am unable to consistently get the app to function properly.

Have you tried mocking up this function with numbers or words instead, and seeing if you get the same issue? Then you can narrow it down to images, or the logic itself? Maybe there is something about images you will figure out. Or if it persists, maybe you will see me clues to the issue.

Just a thought.

I have tested it over a couple hundred times as there are 8 different product categories that this logic is working on. During the tests, I first try one category and if it works, I continue testing the other 7 categories.

What I notice is that sometimes it works correctly, which to me indicates the logic is correct, and other times it doesn’t work correctly, where the list of images either never gets set to the correct number or even after getting set to the correct number, the list is then changed somehow.

I have absolutely no workflow events on the page that would be causing the images to be removed from the list.

To test for the idea that it is logic, I added another workflow event to be triggered around 10 seconds after the list should have been set, to basically set the list a second time to just ensure it as all the images necessary…even with this the issue persists.

The problem is that I have things on page to hide/show based on the count of the list of images, I am able to see clearly that sometimes the list goes from 13 to 8 to 11. That to me is the strangest thing, the fact that I can see it is set correctly, and then changes randomly…and this didn’t start happening after I added to the workflow to set the list a second time, it was happening before that and after that.

What I would ultimately like to find out is if there is a way with the API workflow to make sure all the images created will be set in the image_list.


This is how I have set up the API workflow to try and save the images to the list…this because of the lag time in the creation of the images seems to be a place to cause some problems, but was one of only a couple of ways to get the images to save to the list.

Another way was to create another api endpoint to run

I used this endpoint on the first endpoint

At first test this seemed to be a solution, as things were getting added to list quicker and while conducting the first rounds of tests was working, until the 5 test when the count of the list again started to change.

The other thing is that there are no images being saved at this point. The data being created as shown in the screen shots is just data such as texts. What I am doing is creating a set of images ( without images attached ) to use as an image guide for users to upload specific types of images like so

So the issue isn’t necessarily with images as a type because I have been only really saving words and numbers up to this point. It is at this point that the user would be uploading the images, which I have no problems getting the data saved correctly.

So, I am really stuck on this. I’ve submitted a bug report, but was hoping the forum could lead to other experiences.

I even just tried to change the api workflow a bit, hoping that each image created would get added to the list just after being created.

On my first test, the list only went up to 4 and after refreshing data it went down to three…

and this is the data in the database

It literally is unexplainable in my mind as I was in the database view to watch ( by refreshing data constantly ) the images getting added to the list and it at one point went up to 4 and then on next refresh went down to 3 and stayed there.

Just tested another method…

I set up a separate event to add each image to the list based on its sort order…tested the first four categories and it was working ( again getting my hopes up that I would have solved the problem )

Then on the fifth test I got the following result

Prior to this pink group getting displayed there is a black blur out group that covers the page with a progress bar…while this black blur out group is displayed, the image R.G. ( the one that has the category names and blue colored guidance icons ) is hidden and doesn’t get triggered to be displayed until the image list has the correct number of images ( 13 or 8 depending on category )…

The pink group is triggered to be shown only when the number of images in the list is less than the total ( 8 or 13 )…so what happened on the 5th test was that all 8 images were added to the list…but then 5 of them were removed. ( as I write this I am thinking to test another theory on this, that for some reason the left over add to list events are causing a problem so I will add another condition to them)**

Just tested again

Set up a conditional to hopefully help the last five instances not affect the list

First test went well, so I cleared the database and began another test

And it failed

AND something very strange occurred, I noticed that on a refresh of the data I saw three in the list, then I looked at the page and the loading screen and it showed 8 images loaded, so I refreshed the data base again to see if 8 images were in the list, however no luck, it was only three. THE STRANGE thing is that the list of 3 was now different…look at the 3rd image in the list.

It is the last image to be loaded…look at the images in the database

Very very strange behavior with nothing that I can think of to resolve it by having different logic and “backstops”…nothing works and I continually get this strange behavior of list items being deleted.

ANOTHER TEST where I tried to use set list instead of add list had same results…4 or 5 of first tests worked, heart gets up beat, feel like you might finally have a solution, then test again and same thing happens…goes to right number then items are removed from the list.

After testing so many different ways, my conclusion is that there is an issue around how and when images are created during the API workflow event. In my database I am able to see that images are created “out of order” because my sort orders that are set on the image are not saved to the database in the same order they should be. For example sometimes the image with sort order 4 is the second image saved to the database.

I think it is boiling down to, what is the way to know that the API workflow event of creating images in the database has finished, so that then I could run the search to add them to the image_list.

When I test using a pre-determined number of seconds ( not ideal as shouldn’t have to delay by 20 or 30 seconds every time ) I notice that not all the images are saved to the list because they have not yet been saved to the database ( ie: the api workflow hasn’t finished creating all items ).

Is there a way to trigger an event when an API workflow is complete?

This topic was automatically closed after 14 days. New replies are no longer allowed.