Skip to content

Bug: default theme "feature_based" causes poster generation failure #232

Description

@rishabhk571
## Summary

The map generator at https://maptoposter.penk.in/ fails when the default theme value is submitted.

## Error Message

```text
Error: Generation failed: Error: Theme "feature_based" not found.

Steps to Reproduce

  1. Open https://maptoposter.penk.in/.
  2. Leave the default theme selection unchanged.
  3. Click Generate Poster.
  4. Observe the generation failure.

Actual Behavior

The generator submits the theme value feature_based.

The backend rejects the request because feature_based is absent from the supported theme list.

Expected Behavior

The generator should submit a valid default theme and generate the poster successfully.

Available Themes Shown by the System

autumn
blueprint
contrast_zones
copper_patina
emerald
forest
gradient_roads
japanese_ink
midnight_blue
monochrome_blue
neon_cyberpunk
noir
ocean
pastel_dream
sunset
terracotta
warm_beige

Likely Cause

The frontend appears to initialize the theme state with feature_based.

The backend appears to validate themes against the supported theme list above.

This creates a mismatch between the frontend default value and the backend theme registry.

Suggested Fix

Set the frontend default theme to a valid supported key, such as ocean, blueprint, or contrast_zones.

Add backend fallback handling for empty or invalid theme values so the request uses a valid default theme.

User Workaround

Manually selecting a visible theme such as Ocean, Blueprint, or Contrast Zones before generation may avoid the error.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions