Did you make sure to go to Maintenance > Clear System Cache after you added your stuff to the database?
And, I forgot to mention... the closure table. (Honestly, I try to forget about that table!).
Every one of your nodes will have at least one row in there. For Galleries, they will have one for themselves and each photo in it.
parent: 650540
child: 650540
depth: 0
display order: 0
publishdate: 1396136765
Then say you have a photo with nodeid x in that gallery (same publish date):
parent: 650540
child: x
depth: 1
display order: 0
publishdate: 1396136765
AND, a row for itself:
parent: x
child: x
depth: 0
display order: 0
publishdate: 1396136765
|