Errors hosting hugo website on cloudflare - web

I am trying to host a hugo site I made on cloudflare but it keeps giving me error when it tried to build the site, the site uses a custom build command and it works just fine on my pc (which is running windows 10).
I am not exactly sure what the error is but I think it has something to do with calling the other files. any help would be much appreciated.
(Cloudflare is cloning the site from my Github repo)
Here are the logs from cloudflare:
Executing user command: hugo server -t hugo-theme-shell -w -D
2022-11-13T23:03:07.769635Z Building sites … ERROR 2022/11/13 23:03:07 render of "home" failed: execute of template failed: template: index.html:3:8: executing "index.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/hugo-theme-shell/layouts/partials/head.html:6:7": execute of template failed: template: partials/head.html:6:7: executing "partials/head.html" at <partial "themes/hugo...>: error calling partial: Partial "themes/hugo-theme-shell/layouts/partials/style.html" not found
2022-11-13T23:03:07.769998Z ERROR 2022/11/13 23:03:07 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:3:8: executing "_default/list.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/hugo-theme-shell/layouts/partials/head.html:6:7": execute of template failed: template: partials/head.html:6:7: executing "partials/head.html" at <partial "themes/hugo...>: error calling partial: Partial "themes/hugo-theme-shell/layouts/partials/style.html" not found
2022-11-13T23:03:07.770177Z Total in 3 ms
2022-11-13T23:03:07.770303Z Error: Error building site: failed to render pages: render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:3:8: executing "_default/list.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/hugo-theme-shell/layouts/partials/head.html:6:7": execute of template failed: template: partials/head.html:6:7: executing "partials/head.html" at <partial "themes/hugo...>: error calling partial: Partial "themes/hugo-theme-shell/layouts/partials/style.html" not found
2022-11-13T23:03:07.77619Z Failed: build command exited with code: 255
2022-11-13T23:03:08.586593Z Failed: an internal error occurred
I tried going through the files but I was having a hard time understanding what the errors were and what was causing them.
I also tried making sure all the files were uploaded to Github properly.

"Partial "themes/hugo-theme-shell/layouts/partials/style.html" not found"
It can't find the partial "style.html"

I suggest you share your github repo, because otherwise it is difficult to analyze.
It could be:
an issue with the directory structure in Windows vs when deploying in GitHub. Check in particular the slashes and backslashes that behave differently.
a difference between the hugo version used by GitHub to render your site, and the one you use on your local computer
an issue with the CloudFlare page deployment module, which is still quite new. See the known limitations below. And you can also have a look at similar issues in the CloudFlare community forum.
https://developers.cloudflare.com/pages/platform/known-issues/
If you can not fix it, an alternative would be to render the site on your desktop, then commit on github with Hugo public/ directory, and then use CloudFlare Pages without the Hugo deployment, just using pointing to your public/ directory.

Related

Error when starting a local server on Mkdocs Windows, how do I fix?

I am trying to edit some docs on github, here are my instructions:
Clone the repo
Create a virtual environment
Install dependencies
Start a local server
I am able to 1 and 2 no problem, and 3 installs: mkdocs and mkdocs-material
I run into an issue on #4 with an error:
"ERROR - Config value: 'pages'. Error: The configuration option 'pages' was removed from MkDocs. Use 'nav' instead.
Aborted with 1 Configuration Errors!"
The MkDocs website does state this:
"Breaking change: the pages config option that was deprecated for a very long time now causes an error when used (#2652)
To fix the error, just change from pages to nav."
I am not a dev, so not sure what changing pages to nav means. There are some files named pages, but changing to nav would be nav(2).
How would I fix this?
TIA!
So MkDocs no longer supports the 'pages' tag on generating the site. The replacement for it is called 'nav'.
So all you have to do generally is replace 'pages' in your mkdocs with 'nav' and that should fix it

Upload from GitLab to Artifactory during pipeline fails occasionally

Occasionally the first upload of artifacts during a GitLab pipeline fail.
I'm getting the following error message in the logs:
2019-08-01 13:43:14,149 [http-nio-8082-exec-187] [ERROR]
(o.j.s.b.p.t.FilePersistenceHelper:87) - Failed moving
'path_to_artifactory\filestore_pre\dbRecord123.bin' to
'path_to_artifactory\filestore\5e\5ecc5f719b4442b9b04f9010646d34917aca8ca2'.
Access to file denied null 2019-08-01 13:43:14,149
[http-nio-8082-exec-187] [ERROR] (o.a.w.s.RepoFilter :251) - Upload
request of products-stage-qa:file_to_upload failed due to {}
java.nio.file.AccessDeniedException: Failed to persist file with sha1:
5ecc5f719b4442b9b04f9010646d34917aca8ca2
This seems to happen only during builds, but not during other uploads directly by a user.
It doesn't happen all the time, and only on first tries. But I haven't found any logic when the first try fails or succeeds. It doesn't seem to have anything to do with file types or the like. I can't really determine if it has anything to do with network speeds though since I only have access to part of the infrastructure.
I found an open ticket with the same error message, but only for Conan and for us it only happens with ivy repositories
We are using Artifactory 6.9.1 and GitLab 12.0.3 starter
This looks to be a permission issue. You are getting an error message that states that the move failed due to "Access to file denied".
You can try to log in to the server using the "artifactory" user and manually move the file called "path_to_artifactory\filestore_pre\dbRecord123.bin" to "path_to_artifactory\filestore\5e\5ecc5f719b4442b9b04f9010646d34917aca8ca2" and see if you have any issues with this. To log in to the server with the "artifactory" user you can use the command "sudo -s -u artifactory".
You will also need to make sure that all filestore and its subdirectories are owned by the "artifactory" user and have the correct permissions.
Hope this helps.

Getting This Error PHP Fatal error: Class 'Google\Cloud\Language\LanguageClient' not found

I have been trying to use the Google Cloud Language APIs.
Below are the steps that I followed -
Download PHP Files from the GitHub - https://github.com/GoogleCloudPlatform/google-cloud-php
In my root folder, I have the exact same directory structure.
I ran composer require google/cloud and google/cloud-language
It created vendor folder in 'src' folder.
I created a testnlp.php file the same code as on this page for Google NLP - https://github.com/GoogleCloudPlatform/google-cloud-php
I ran testnlp.com but I am getting below error -
"Getting This Error PHP Fatal error: Class 'Google\Cloud\Language\LanguageClient' not found "
Please help. What am I doing wrong ?
I am using shared hosting with PHP5.5 version.

ERROR: CCurlFile::FillBuffer - Failed: HTTP response code said error(22) xbmc

I'm trying to host and distribute xbmc addon on my site. I've made a repository which points to the directory where the addon zip file is. At the same folder I have an xml which describes the addon and so the addon name and description are being recognized by xbmc.
However when trying to install the addon it shows 0% downloading progress and then the progress disappears - resulting in the following error inside xbmc.log file:
ERROR: CCurlFile::FillBuffer - Failed: HTTP response code said error(22)
according to curl errors page, this happens when -
CURLE_HTTP_RETURNED_ERROR (22)
This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP
server returns an error code that is >= 400.
by that I assume the error may be caused by a misconfigured access permissions (perhaps I need to change some htaccess configuration?).
please help
I solved this on my own eventually. Apparently, the file structure was wrong - I needed to follow the file structure as mentioned in section 4.3 here in order for it to work

Problem creating RichFaces page theme

I'm trying to create a RichFaces page theme using the instructions here. I know NOTHING about Maven, so I've followed the instructions as best I can, but I've run into an error and don't know what I'm doing wrong. I followed the instructions on the page, and then run this command:
mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-theme -DarchetypeVersion=3.3.3.Final -DartifactId=test -DgroupId=org.richfaces.docs -Dversion=1.0mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-theme -DarchetypeVersion=3.3.3
However, when I run the command I get the following error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:create (default-cli) on project standalone-pom: Error creating from archetype: org.apache.maven.archetype.downloader.DownloadException: Error downloading org.richfaces.cdk:maven-archetype-theme:jar:3.3.3. Could not transfer artifact org.richfaces.cdk:maven-archetype-theme:jar:3.3.3 from/to repository.jboss.com (http://repository.jboss.com/maven2/): Access denied to: http://repository.jboss.com/maven2/org/richfaces/cdk/maven-archetype-theme/3.3.3/maven-archetype-theme-3.3.3.jar
[ERROR] org.richfaces.cdk:maven-archetype-theme:jar:3.3.3
I tried browsing to http://repository.jboss.com/maven2/, but I get an "Access Denied" error, just as stated in the error message. My question is, how do I rectify this? Is there a different URL that I should be using? If so, do I edit the Maven settings.xml file and use the new URL? I'd REALLY appreciate anyone that can give me some direction on this.
The link of the Jboss Repository for Maven specified in the jboss_profile.txt seems to be outdated.
You can try to replace all <url> of all Jboss Repository for Maven with https://repository.jboss.org/nexus/content/groups/public-jboss/ in your Maven settings.xml

Resources