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

View pseudo-pattern leads to 404 #458

Closed
thenickname opened this issue Aug 31, 2016 · 5 comments
Closed

View pseudo-pattern leads to 404 #458

thenickname opened this issue Aug 31, 2016 · 5 comments

Comments

@thenickname
Copy link

I am using Pattern Lab Node v2.5.0 on Mac, with Node v5.5.0, using the Gulp Edition.

Expected Behavior

When defining a pseudo pattern, e.g. button~--primary.json to describe a variation of a button, another instance of the component should be displayed and correctly linked to a sub-page showing only the variation

Actual Behavior

Clicking on the title of a generated pseudo pattern leads to 404 Cannot GET /patterns/, instead of linking to the "Button Primary" page

Steps to Reproduce
  1. Create a simple pattern like atoms/buttons/button.mustache
  2. Create a pseudo pattern for the previously created pattern, e.g. atoms/buttons/button~--primary.json
  3. Go to Atoms --> Buttons --> View All
  4. Verify that the default button and the pseudo pattern "Button Primary" are both displayed correctly
  5. Click on the linked headline "Button Primary"
  6. Cannot GET /patterns/ occurs
@bmuenzenmeyer
Copy link
Member

Confirmed this bug.

@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Aug 31, 2016

Confirmed this bug. the pending PR #411 seems to help address this actually.

https://github.com/pattern-lab/patternlab-node/blob/master/core/lib/pseudopattern_hunter.js#L47 createPattern() does not construct a pattern like the constructor does, so when getPatternLink gets called by the patternLink property we hotwire to null

@bmuenzenmeyer
Copy link
Member

@thenickname this is in dev now.

@thenickname
Copy link
Author

@bmuenzenmeyer thanks a lot! Switched to dev for now.

@bmuenzenmeyer
Copy link
Member

@thenickname FYI this has already made it to master, when the issue was auto-closed.

so switching back to patternlab-node: '^2.0.0' and running annpm update` will put you back on a more stable channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants