You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working on the planetary industry plugin from Jay, I noticed that some of the contents of a storage container (launchpad or storage facility) are missing.
Queried the API and the information is correct. A snippet from the EVE ESI API.
I've been trying to figure out why this is happening but to no avail so far.
The 3 planets, that are on this character, have overlapping contents across multiple planets in the same system and I think this has something to do with the problem:
To make it easier, I listed the contents of 2 planets and their launchpad.
X - Hazmat Detection System
Bacteria
Biofuels
Biomass
Chiral Structures
Industrial Fibers
Plasmoids
XI - Planetary Vehicles
Biomass
Chiral Structures
Oxygen
Precious Metals
Reactive Metals
Silicon
In this case, one planet contains all 6 resources (6 database rows) in the launchpad, the second doesn't contain all 6 resources but only 4 (4 database rows) and 2401 (Chiral Structures) and 3779 (Biomass) are missing from the database table but are in the API endpoint response (which I've included in full, just in case).
Coincidentally, these are also the two P1 that are on both planets... Which is a maybe a clue to where the problem could be...
The issue seems to be related to cleanContents (code).
If multiple characters have different planet_ids but share the same type_id, this query deletes valid records because it only filters by character_id and type_id without considering planet_id.
I think the solution would be to:
CharacterPlanetContent::where('character_id', $this->getCharacterId())
->where('planet_id', $this->planet_id) // Fix: Ensure we only delete from the correct planet!
->where('type_id', $type['type_id'])
->whereNotIn('pin_id', $pins->pluck('pin_id'))
->delete();
When working on the planetary industry plugin from Jay, I noticed that some of the contents of a storage container (launchpad or storage facility) are missing.
Queried the API and the information is correct. A snippet from the EVE ESI API.
However, in the database I only find:
I've been trying to figure out why this is happening but to no avail so far.
The 3 planets, that are on this character, have overlapping contents across multiple planets in the same system and I think this has something to do with the problem:
To make it easier, I listed the contents of 2 planets and their launchpad.
In this case, one planet contains all 6 resources (6 database rows) in the launchpad, the second doesn't contain all 6 resources but only 4 (4 database rows) and 2401 (Chiral Structures) and 3779 (Biomass) are missing from the database table but are in the API endpoint response (which I've included in full, just in case).
Coincidentally, these are also the two P1 that are on both planets... Which is a maybe a clue to where the problem could be...
esi_response.json
I was looking at the code but couldn't really determine what could be the issue. Perhaps a bug in the model itself?
Any help would be really appreciated!
The text was updated successfully, but these errors were encountered: