Not sure if this actually is a bug, or if I’m doing something fishy.
When query’ing the Instagram API, I get back a bunch of JSON, containing an array with all my pictures.
All pictures have a unique id field, which is the picture of the id, followed by the user’s id.
E.g. 1416005213411718757_1452701316
When I loop over all my pictures, and try to create a page with the image ID, the first one always succeeds. Starting from the second, it fails and tells me Caught exception: The page UID exists.
The created UID for the first page however gets turned into 1425394031323664471-1452701315, looking like the lodash is automatically replaced by a hyphen. But for some reason, the second page won’t get created.
You could also try str::slug($image['id']). Maybe it just doesn’t like the underscore. The repeating part shouldn’t be the problem as long as the UID is unique
God, how stupid of me . The first number is regarded as a visibility flag, of course, so each page does indeed have the same UID if you use the complete $image['id'].
If you want to use `$image[‘id’], you would have to prepend a string, e.g.