Team Staatic
Forum Replies Created
-
We have just released a patched version 1.10.3 that should resolve this issue. Please update to this version and let us know if it addresses the problem. Thanks again.
We’re very sorry about this. It appears something slipped through our testing process. In order to make our plugin compatible with as many environments as possible, we downgrade our PHP code to support PHP versions all the way down to 7.1. During this process, a critical dependency got downgraded incorrectly, causing the fatal error you’re experiencing.
We are actively working on a patch that should resolve this issue. As soon as it’s ready, we will update this thread. Thank you for your patience and understanding.
Hi Ben, hope you’re doing well. Just wanted to follow up and see if the publication process was successfully resolved, as there hasn’t been any update for a while. Thanks!
Hi Ben,
Sorry to hear that you’re experiencing these issues.
A few questions to help us diagnose the problem:
- Did this happen after an upgrade of some kind, or did it occur out of the blue?
- When the publication is stuck at “Preparing publication,” it often indicates that Staatic is unable to successfully perform loopback requests. Can you check the Site Health report to see if there are any issues reported there?
- If the Site Health report doesn’t show any issues, could you send us the Site Health Info report by emailing it to contact@staatic.com?
Regarding the second issue:
- Is this the same setup with Windows 10 via XAMPP?
- Did this site also get stuck at “Preparing publication” earlier?
- Could you provide the number of results (to get an indication of the site’s size) and the deployment method being used?
Looking forward to your information. If you prefer to share some details privately, feel free to email us at contact@staatic.com.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Images are Renamed, File Path BrokenThanks for the update and confirmation. You’re very welcome! If you have any further questions or need additional assistance in the future, please don’t hesitate to reach out.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Images are Renamed, File Path BrokenThank you for your detailed response and kind words! We’re happy to help.
After further investigation and trying to reproduce the exact issue you’re experiencing, we have identified several key points.
We can confirm that the issue you are seeing is indeed caused by the file path length exceeding the Windows maximum path length of 260 characters. Although Staatic correctly writes the files of the static version of your site into the configured target directory, certain applications and system functions may not handle it properly when the path length exceeds this limit.
Interestingly, when right-clicking the file with the long path in Explorer and selecting “Copy as path”, the path is converted using the 8.3 filename convention (short filenames), e.g.,
C:\Users\zachb\Documents\ZACHSD~1\Projects\ACTIVE~1\UBSWOR~1\PROJEC~1\STAATI~1\STAATI~1\WP-CON~1\uploads\ELEMEN~1\thumbs\UBS-LO~1.JPG. While the regular path does not display correctly in the browser, this shortened path does.To make the static version of the site work, you will either need to use a web server to host it, or place the files in a different path that does not cause any file paths to exceed the limit of 260 characters when using Offline URLs.
The appended 40 characters to the PNG file name appear to be caused by Elementor. When selecting a custom image resolution, Elementor may generate a scaled version of the image at the exact resolution required, resulting in these longer filenames.
Regarding the URL mismatch, it is possible that there are two versions of the image, or the image path may have been altered in some way. Staatic simply takes over the file names as they appear on the dynamic version of your site and only alters the beginning of the URL to ensure compatibility with offline sites or different domains.
Hopefully, this information helps resolve the issue. If you continue to experience problems, please feel free to reopen the issue or open another topic, and we’ll be happy to assist further.
- This reply was modified 1 year, 11 months ago by Team Staatic.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Images are Renamed, File Path BrokenThanks for reaching out and sorry to hear you’re running into an issue creating a static version of your WordPress site.
To better understand the situation and determine if the Windows maximum path length is the root cause, could you please provide the exact path of your site on the Windows file system? For a default site path using LocalWP with a Windows username “Username”, the path length for the logo file would be 193 characters:
C:\Users\<Username>\Local Sites\urbanbirdservices\app\public\wp-content\uploads\2024\03\elementor\thumbs\UBS-Logo-2024-02-06-High-Quality-Cornerless-qlggdi1juyf9cleg0psnukzxka2r3my325cxh7weie.pngWhen deployed to the default Local Directory target directory, this path extends to 227 characters:
C:\Users\<Username>\Local Sites\urbanbirdservices\app\public\wp-content\uploads\staatic\deploy\wp-content\uploads\2024\03\elementor\thumbs\UBS-Logo-2024-02-06-High-Quality-Cornerless-qlggdi1juyf9cleg0psnukzxka2r3my325cxh7weie.png,which is still below the Windows default maximum path length of 260 characters (for more details, see Microsoft’s documentation on maximum file path length).
Given that you’re encountering a crawl error for the logo, it suggests there might be another underlying issue. Staatic functions by crawling/visiting each page and asset on your site as a regular (non-authenticated) visitor would. It follows any internal links within your site’s scope and processes them to ensure compatibility with a static site version.
To address the 404 error Staatic reports while attempting to retrieve the logo, please check if the logo displays correctly on the dynamic version of your site at http://urbanbirdservices.local. Also, verify if the logo URL referenced in the HTML source code of the page matches the one references in the error reported.
If reducing the path length resolves the issue, implementing shorter names before generating the static site is indeed the best practice.
Looking forward to your feedback to help resolve this issue.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Query Loop with PaginationWe’ve identified that the Pagination block editor widget sometimes generates query string links instead of pretty URLs, which can cause issues, especially on static sites. The root of this issue seems to be tied to how the Pagination block interacts with the WordPress theme and settings. Specifically, if the query loop does not inherit from the global query, it generates query string URLs, which are not compatible with all setups.
A successful workaround that has helped in this scenario involves setting the desired page as the site’s “Posts page” under Settings > Reading in WP-Admin. This adjustment ensures that the Pagination block correctly inherits from the global query and thereby generates pretty URLs.
For those experiencing similar issues, please try adjusting your “Posts page” settings and consider the compatibility of your WordPress theme with the block editor’s pagination widget.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Query Loop with PaginationHi Ashley, thanks for posting your issue regarding pagination. Generally, static sites do not support query strings (e.g.,
?page=2). Instead, pagination should be handled with pretty permalinks, such as/page/2/,/page/3/, etc. This should work seamlessly with Staatic.To better assist you, could you please provide the following details:
- An original HTML snippet where pagination is implemented on the dynamic site.
- A HTML snippet of the same after being processed by Staatic.
- The configured “Destination URL”, which can be found under Staatic > Settings > Build in your WordPress dashboard.
If there are any specific configurations or additional details you think might be affecting how pagination is handled, those would be helpful as well. For a comprehensive view of your site’s setup, you can provide the site information by navigating to WP-Admin > Tools > Site Health > Info (tab) and clicking “Copy site info to clipboard”, then sending it to contact@staatic.com.
Looking forward to your response to help get this sorted out!
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Page Not Found Path: /404_not_found/After further testing and feedback, we’ve made an additional update to the development version of the plugin, which has now successfully addressed the problem. This fix will be included in version 1.9.3 of the plugin, scheduled for release later this week.
Thanks @benleow, for your assistance on this issue.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Page Not Found Path: /404_not_found/Thank you for supplying the necessary details. From the information you provided, it seems we have pinpointed the potential source of the issue. To verify our hypothesis, could you please download and install the development version of the plugin by visiting https://wordpress.org/plugins/staatic/advanced/ (select Advanced Options > Previous Version > Development Version > Download), and then proceed with initiating a new publication process?
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Page Not Found Path: /404_not_found/Hi Ben, thanks for reaching out and detailing the issue you’re experiencing.
Normally, the default setting (“/404_not_found/”) should work seamlessly and be used on the deployed static site, including when hosted on Netlify. I’m sorry to hear that you’re encountering difficulties with the 404 page not displaying as expected.
We attempted to reproduce the issue you’ve described but were unable to encounter the same problem. This leads us to believe that there might be a specific configuration or condition in your site setup that is causing this behavior.
To help us diagnose and resolve this issue, could you please provide us with some additional information:
- Site Health Info: navigate to Tools > Site Health > Info in your WordPress dashboard. Click Copy site info to clipboard to copy this information.
- Publication Logs: while having “Extensive logging” enabled in Staatic > Settings > Advanced, start another publication process. Once the publication has completed, retrieve the logs by going to the publication details, clicking on the Logs tab, and then clicking the Export button at the top of the page.
Please send the site health info and exported log file to contact@staatic.com. This info will help us pinpoint the issue more accurately.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Sites with url end in .htmlYou’re correct – the version signature for the development build is currently the same as the stable 1.9.2 release. This signature will be updated with the next major stable version.
I’m really glad to hear that the adjusted file naming convention in the development version has resolved your issue with the unwanted trailing slashes! And that serving the static files through Nginx is now working smoothly.
Thank you for confirming that everything is operating as intended. We appreciate you taking the time to test the development build and provide feedback. Do not hesitate to reach out if any other questions come up.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Sites with url end in .htmlThanks for clarifying the details. We now understand the issue stems from how Nginx handles your site’s file structure.
Nginx has a feature that automatically redirects requests to directories missing a trailing slash. This appears incompatible with Staatic’s default file structure, resulting in URLs with an unwanted trailing “/”.
There are a couple options to address this:
- Configure Nginx by changing the
try_filesdeclaration to:try_files $uri $uri/index.html $uri/ /index.html;
This should serve the correct page immediately instead of redirecting. However, we realize this may not be possible in all setups. - Use Staatic’s development version with an updated file structure. We’ve made changes so the file structure works with Nginx out of the box. You can download this version by:
- Going to the Staatic plugin page
- Selecting “Advanced View”
- Under “Advanced Options > Previous Versions”, choose “Development Version”
- Click “Download”
The development version should resolve the issue with unwanted slashes in your URLs. Please install this updated version of Staatic and let us know if you have any other questions or run into any issues.
Forum: Plugins
In reply to: [Staatic - Static Site Generator] Sites with url end in .htmlThanks for the follow-up and the details about your setup. It helps us narrow down the issue with your permalink structure after using Staatic.
To ensure we’re on the same page, it sounds like the HTML Staatic generates has the correct links ending in “.html”, and your C# script only adjusts the static file/directory structure post-generation. This makes me wonder exactly where the “.html/” issue crops up in your workflow.
A few more questions for clarification:
- When and where exactly do you notice the URLs ending with “.html/”?
- You mentioned using Docker, but could you specify the web server(s) or proxy(s) setup? The server configuration might influence how URLs are handled and displayed.
Understanding these details is crucial for us to pinpoint the issue accurately.
Looking forward to your response.