makeplane/plane · error · Error

Publish settings not found

Error message

Publish settings not found

What it means

Thrown by addIssueVote in the Space issue-detail store when the publish settings for the given anchor cannot resolve a project ID and workspace slug. publishList.publishMap[anchor] must yield an object with `.project` and `.workspace_detail.slug`; if either is missing, voting is impossible because the backend vote endpoint needs both identifiers.

Solutions

  1. Ensure publishList for the anchor is loaded before rendering the vote control (gate the UI on `!!publishSettings?.project && !!publishSettings?.workspace_detail?.slug`).
  2. If the anchor is stale, re-fetch via the correct published-issue URL to obtain a fresh anchor.
  3. Verify the publish record in the backend still references a non-deleted project and workspace.
  4. Add an early-return or retry in addIssueVote when publishMap[anchor] is undefined rather than throwing.

Example fix

// before: throws if publish settings not yet in store
if (!projectID || !workspaceSlug) throw new Error("Publish settings not found");
// after: await the settings, or guard the UI upstream
const publishSettings = await this.rootStore.publishList?.fetchPublishSettings(anchor);
if (!publishSettings?.project || !publishSettings?.workspace_detail?.slug) return;
Defensive patterns

Strategy: validation

Validate before calling

const ps = rootStore.publishList?.publishMap?.[anchor];
if (!ps?.project || !ps?.workspace_detail?.slug) {
  await rootStore.publishList?.fetchPublishSettings?.(anchor);
}
// only call addIssueVote once both are present

Type guard

const hasPublishContext = (ps: unknown): ps is { project: string; workspace_detail: { slug: string } } =>
  typeof ps === 'object' && ps !== null &&
  typeof (ps as any).project === 'string' &&
  typeof (ps as any)?.workspace_detail?.slug === 'string';

Try / catch

try { await addIssueVote(anchor, issueID, { vote }); }
catch (e) { setVoteError('Voting unavailable right now.'); }

Prevention

When it happens

Trigger: User on a public published issue tries to upvote/downvote before the publishList store has loaded/anchored the publish settings for that anchor; the anchor is valid for viewing but the publish record was partially deleted or migrated; the public page was opened with an anchor that has no matching entry in publishMap (e.g. wrong/old anchor).

Common situations: Race condition: vote UI rendered before publishList fetch resolved; share link with a stale anchor from before a project was renamed/moved; publish settings object shape changed across versions and an old client reads it incorrectly.

Related errors


AI-assisted analysis of makeplane/plane@1c8a60f858 (2026-08-12). Data as JSON: /api/errors/42e2ca883844fce1. Report an issue: GitHub.

Appendix: source

Thrown at apps/space/store/issue-detail.store.ts:398

      runInAction(() => {
        set(this.details, [issueID, "reaction_items"], newReactions);
      });

      await this.issueService.removeReaction(anchor, issueID, reactionHex);
    } catch (_error) {
      console.log("Failed to remove issue reaction");
      const reactions = await this.issueService.listReactions(anchor, issueID);
      runInAction(() => {
        set(this.details, [issueID, "reaction_items"], reactions);
      });
    }
  };

  addIssueVote = async (anchor: string, issueID: string, data: { vote: 1 | -1 }) => {
    const publishSettings = this.rootStore.publishList?.publishMap?.[anchor];
    const projectID = publishSettings?.project;
    const workspaceSlug = publishSettings?.workspace_detail?.slug;
    if (!projectID || !workspaceSlug) throw new Error("Publish settings not found");

    const newVote: IVote = {
      actor_details: this.rootStore.user.currentActor,
      vote: data.vote,
    };

    const filteredVotes = this.details[issueID].vote_items.filter(
      (v) => v.actor_details?.id !== this.rootStore.user.data?.id
    );

    try {
      runInAction(() => {
        runInAction(() => {
          set(this.details, [issueID, "vote_items"], [...filteredVotes, newVote]);
        });
      });

      await this.issueService.addVote(anchor, issueID, data);

View on GitHub (pinned to 1c8a60f858)