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

Error on permalink #249

Closed
mariuz92 opened this issue Nov 8, 2020 · 7 comments
Closed

Error on permalink #249

mariuz92 opened this issue Nov 8, 2020 · 7 comments

Comments

@mariuz92
Copy link

mariuz92 commented Nov 8, 2020

Reason for this issue

Error when trying to update a new post -->

work validation failed: permalink: Path permalink (``) is shorter than the minimum allowed length (2). in posts:savePost

Steps to Reproduce

When typing the title for the post only a few letters are transmitted to the permalink.
screenshot-localhost-3000-dashboard-posts-work-add-new-1604859403901
screenshot-localhost-3000-dashboard-posts-work-add-new-1604859385338

@antonyadhiban
Copy link

antonyadhiban commented Nov 10, 2020

Having the same issue.

Update:
Only the letter w is accepted in the permalink. So /w or /ww or /www works and saves. Anything else just throws the same error.

@arpowers
Copy link
Collaborator

Will patch this today.

@abishekrsrikaanth
Copy link

abishekrsrikaanth commented Sep 1, 2021

which version is this patch available on. I am currently on v1.8.28 and I have this issue. Can seem to upgrade to v1.8.30. Getting an error when running npx factor dev. Cannot create any new posts because of this issue.

@arpowers
Copy link
Collaborator

arpowers commented Sep 1, 2021

whats the error?

@abishekrsrikaanth
Copy link

abishekrsrikaanth commented Sep 1, 2021

@arpowers The same error that is described above. Here is a screencast of the same.

CleanShot 2021-09-02 at 04 39 35

  • I add the title and a random slug/permalink is generated.
  • When I click the Update button, the permalink gets set to blank and it doesn't allow me to create the work post.

This is the case on any post type I create.

Editing the permalink also doesn't work and resets it to blank

@abishekrsrikaanth
Copy link

abishekrsrikaanth commented Sep 1, 2021

If you meant the error when upgrading to v1.8.30, here is the error output when running npx factor dev after running npm upgrade.

  • I have also tried to remove package-lock.json and node_modules folder and ran npm upgrade.
  • I have tried to manually update the version on package.json, removed package-lock.json and node_modules folder and ran npm install. Still the following error
/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710
        return old(m, filename);
               ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/lodash-es/lodash.js from /Users/abisheksrikaanth/project.
Instead change the require of lodash.js in /Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/api/utils-lodash.ts to a dynamic import() which is av.
    at Object.require.extensions.<computed> [as .js] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/api/utils-lodash.ts:4:19)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/api/utils.ts:25:14)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/api/settings.ts:7:17)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/api/about.ts:7:20)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/api/logger.ts:12:17)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/api/index.ts:26:34)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/build/webpack-overrides.ts:8:15)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/build/webpack-config.ts:7:1)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/cli/cli.ts:27:26)
    at Module.m._compile (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:708:29)
    at Object.require.extensions.<computed> [as .ts] (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/ts-node/dist/index.js:710:16)
    at Object.<anonymous> (/Users/abisheksrikaanth/projects/workdoneright-factor/node_modules/@factor/cli/index.js:13:13)

I wasn't sure if this error is related to #257 and I tried the resolution there and that did not work either.

@arpowers
Copy link
Collaborator

arpowers commented Sep 2, 2021

This type of thing is the reason Webpack is so tough to work with and the reason F3 (which is powered by Vite) is just way cleaner.

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

No branches or pull requests

4 participants