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

[Bug]: Sync fails when no posts exist and pretty URLs + posts prefix are set #1887

Open
bttrx opened this issue Dec 19, 2024 · 0 comments
Open

Comments

@bttrx
Copy link

bttrx commented Dec 19, 2024

Operating system

Linux Mint 22 MATE

Publii version

0.46.2 (build 16966)

Post editor

None

Bug description

See title. I agree, it's a corner case, but it should not happen anyway.

Steps to reproduce

  1. Create a new site
  2. Configure server
  3. Enable 'Use pretty URLs'
  4. Set a posts prefix, e.g., 'posts' or 'blog'
  5. Do not create a post
  6. Click 'Sync your website'
  7. Receive 1st error message (see 'Relevant log output')
  8. Click 'Preparation error'
  9. Select 'Cancel'
  10. Receive 2nd error message:

grafik

Relevant log output

Rendering process failed
An error occurred during rendering process:

ENOENT: no such file or directory, scandir '/home/robert/Dokumente/Publii/sites/test/output/posts'

Error: ENOENT: no such file or directory, scandir '/home/robert/Dokumente/Publii/sites/test/output/posts'
    at Object.readdirSync (node:fs:1506:26)
    at t.readdirSync (node:electron/js2c/node_init:2:13703)
    at Sitemap.getFilesList (/tmp/.mount_Publii2YVWMN/resources/app.asar/back-end/modules/render-html/helpers/sitemap.js:220:24)
    at Sitemap.create (/tmp/.mount_Publii2YVWMN/resources/app.asar/back-end/modules/render-html/helpers/sitemap.js:49:20)
    at Renderer.generateSitemap (/tmp/.mount_Publii2YVWMN/resources/app.asar/back-end/modules/render-html/renderer.js:2047:32)
    at Renderer.generateWWW (/tmp/.mount_Publii2YVWMN/resources/app.asar/back-end/modules/render-html/renderer.js:277:24)
    at async Renderer.renderFullPreview (/tmp/.mount_Publii2YVWMN/resources/app.asar/back-end/modules/render-html/renderer.js:193:9)
    at async Renderer.renderSite (/tmp/.mount_Publii2YVWMN/resources/app.asar/back-end/modules/render-html/renderer.js:174:17)
    at async Renderer.render (/tmp/.mount_Publii2YVWMN/resources/app.asar/back-end/modules/render-html/renderer.js:119:13)
    at async process. (/tmp/.mount_Publii2YVWMN/resources/app.asar/back-end/workers/renderer/preview.js:17:22)
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

1 participant