Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to refresh items on compendium actors results in error #16512

Closed
simonward opened this issue Sep 13, 2024 · 5 comments · Fixed by #16791
Closed

Attempting to refresh items on compendium actors results in error #16512

simonward opened this issue Sep 13, 2024 · 5 comments · Fixed by #16791
Labels
bug Functionality that is not working as intended

Comments

@simonward
Copy link
Collaborator

For example, I tried refreshing "Ezren (Level 1)"'s "Staff", "Hand of the Apprentice", and "Cooperative Nature":

pf2e.mjs:1 Uncaught (in promise) Error: PF2e System | Item "Staff" (Compendium.pf2e.iconics.Actor.WNX5OQKPh4uaV7mW.Item.epNtNWhBdtOOmHYs) is its own source.
    at ErrorPF2e (pf2e.mjs:1:8618)
    at WeaponPF2e.refreshFromCompendium (pf2e.mjs:1580:215786)
    at Object.onclick (pf2e.mjs:1607:56784)
    at HTMLAnchorElement.<anonymous> (foundry.js:5982:16)
    at HTMLAnchorElement.dispatch (jquery.min.js:2:40035)
    at v.handle (jquery.min.js:2:38006)
ErrorPF2e @ pf2e.mjs:1
refreshFromCompendium @ pf2e.mjs:1580
pf2e.mjs:1 Uncaught (in promise) Error: PF2e System | Item "Hand of the Apprentice" (Compendium.pf2e.iconics.Actor.WNX5OQKPh4uaV7mW.Item.pnIzRwwzr80qTOcw) is its own source.
    at ErrorPF2e (pf2e.mjs:1:8618)
    at SpellPF2e.refreshFromCompendium (pf2e.mjs:1580:215786)
    at Object.onclick (pf2e.mjs:1607:56784)
    at HTMLAnchorElement.<anonymous> (foundry.js:5982:16)
    at HTMLAnchorElement.dispatch (jquery.min.js:2:40035)
    at v.handle (jquery.min.js:2:38006)
ErrorPF2e @ pf2e.mjs:1
refreshFromCompendium @ pf2e.mjs:1580
pf2e.mjs:1 Uncaught (in promise) Error: PF2e System | Item "Cooperative Nature" (Compendium.pf2e.iconics.Actor.WNX5OQKPh4uaV7mW.Item.tU36WCoQKCSx7dgW) is its own source.
    at ErrorPF2e (pf2e.mjs:1:8618)
    at FeatPF2e.refreshFromCompendium (pf2e.mjs:1580:215786)
    at Object.onclick (pf2e.mjs:1607:56784)
    at HTMLAnchorElement.<anonymous> (foundry.js:5982:16)
    at HTMLAnchorElement.dispatch (jquery.min.js:2:40035)
    at v.handle (jquery.min.js:2:38006)
ErrorPF2e @ pf2e.mjs:1
refreshFromCompendium @ pf2e.mjs:1580
@simonward simonward added the bug Functionality that is not working as intended label Sep 13, 2024
@stwlam
Copy link
Collaborator

stwlam commented Sep 20, 2024

Are they in fact their own sources? That error is only thrown when the item's UUID is identical to its source ID.

@stwlam stwlam added the nonrepro Issues that have not been reproduced label Sep 29, 2024
@stwlam stwlam closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2024
@simonward
Copy link
Collaborator Author

Sorry, missed your question.

No, Ezren's Hand of the Apprentice is:

"_id": "pnIzRwwzr80qTOcw",
"flags": {
	"core": {
		"sourceId": "Compendium.pf2e.spells-srd.Item.bSDTWUIvgXkBaEv8"
	}
}

Attempting to refresh it emits:
pf2e.mjs:1 Uncaught (in promise) Error: PF2e System | Item "Hand of the Apprentice" (Compendium.pf2e.iconics.Actor.WNX5OQKPh4uaV7mW.Item.pnIzRwwzr80qTOcw) is its own source.

@simonward simonward reopened this Sep 29, 2024
@simonward
Copy link
Collaborator Author

It's important to note that it must be a Compendium actor. Imported actors work fine.

@simonward simonward removed the nonrepro Issues that have not been reproduced label Oct 4, 2024
@simonward
Copy link
Collaborator Author

@ammalagonc and @pedrogrullada were able to reproduce the issue.

@CarlosFdez
Copy link
Collaborator

CarlosFdez commented Oct 6, 2024

Repro'd. The thing to stress is that its a embedded item in a compendium actor. The reason is that item.sourceId is always the uuid if its a compendium even if its embedded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality that is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants