How to fix Broken theme - wordpress-theming

I uploaded a theme manually and I get this message:
"Template is missing. Standalone themes need to have a index.php template file.
Child themes need to have a Template header in the style.css stylesheet."
And when I upload directly from Wordpress I get this message:
"The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature"
Like I have shown, I have tried uploading it manually and directly and neither of those work.

Related

Using default Hugo theme content through Netlify produces blank webpage, but works locally. blogdown

I have found the same/similar question to mine here: Create a new static page using blogdown with same hugo theme as main site but I cannot understand what the solution is as there seems not to be one explicitly, or I just do not grasp it.
I am an absolute beginner. I am testing the procedure to move generated code to netlify to produce a website.
I can put the public/post/2020-12-01-r-rmarkdown/index.html file into public/ folder in github and generate the example site on netlify e.g.:
https://github.com/hjhjonas/blogsite/tree/main/public produces
https://elastic-ptolemy-e2ba86.netlify.app/
However I plan to edit the default theme and use that instead. But the default index.Rmd file that produces the index.html file after i edit the yaml files and content files to use is like this:
https://github.com/hjhjonas/blogsite/blob/main/index.html
and produces a blank page on netfify.
But if I knit from Rstudio and serve_site() locally, it looks like this image attached, which is correctly what I need.
What I want to do is edit this original theme/layout and put the generated html into the public folder in github for Netlify to read.
The index.Rmd file that produces this local site is just
---
site: blogdown:::blogdown_site
---
I previous had a 404 error on netlify and followed these steps to realise that the html is required for Netlify to produce the deploy the page:
https://answers.netlify.com/t/support-guide-i-ve-deployed-my-site-but-i-still-see-page-not-found/125
This is the theme that I would like to use https://themes.gohugo.io/themes/hugo-lodi-theme/
I don't know how you generated the public/ folder, but it is not meant to be generated by manually copying or moving any files to it. If you publish a site via Netlify, there is no need to generate the public/ folder locally at all, because it can be automatically generated on Netlify.
First, delete index.html in the root directory, and please do not knit index.Rmd again in the future. Second, delete the public/ folder. After the two deletions, I think your site should appear on Netlify soon. If not, see if blogdown::check_site() has any recommendations.

Github pages shows blank page

My repo: https://github.com/something/personal_website
My website: https://website.com/
I can not figure out why my GitHub pages can’t load any of my source files. The files I want to load are in the src folder. Everything works as it should on localhost. It only loads index.html which is a white blank screen, I don't have anything coded in this file. I’ve seen a few similar posts about this issue but have not found any common discrepancies.
I have installed through npm the gh-pages module and done “npm run deploy”; this created my gh-pages branch. I’ve updated my package.json with the appropriate information. As far as I can tell I have no capital letters in my repository.
I hosted another website previously on Github Pages at this domain with no issues. It appears that Github pages and the process has changed since then and I can’t get it to work.
The problem is that your homepage is trying to load assets from https://something.com/personal_website/static/js/main.3edbf089.chunk.js rather than https://something.com/static/js/main.3edbf089.chunk.js.
Remove the personal_website extension from homepage in package.json and the routes should work properly.
Therefore your new package.json should look like:
{
"homepage" : "https://something.github.io/",
"name": "my-website",
"version": "0.1.0",
...
Make sure that your package.json contains
"homepage": "https://username.github.io/appname"
If you are using BrowserRouter, set the basename:
<BrowserRouter basename={process.env.PUBLIC_URL}>
Your .env file cannot contain something like PUBLIC_URL=/ when you do a deploy (it was the problem in my case)
I've been stuck to this for two days. And finally, I solved it.
It is working to local but after deployment it is opening the blank page.
Problem is we changed the homepage path. So We need to update paths which are in our code.
If I give an example with my case, I added homepage into the "package.json" file something like:
"homepage": "https://[YourGitHubAccountName].github.io/[YourProjectName]"
So after adding this, app doesn't work because The paths which are inside of my code need to be change.
For example:
'/' paths should become '/[YourProjectName]' or
'/test' should become '/[YourProjectName]/test'
Adding "homepage": "https://myusername.github.io/my-app", to your Package.JSON might solve your problem.
remember replace your github user name and your app name.

server not reading css and js files

I have created a website using css, js and jquery, and everything works fine on my local machine, but after uploading it to the server, it was only reading the index.html file, leaving out the css and js. Below you can see the website's structure, after being uploaded to the server, on FileZilla.
enter image description here
I have decided to delete everything, re-check the paths and upload them again, but now all I get is a "403 Forbidden" message, saying that "You don't have permission to access / on this server."
Check file permissions of all the files.
Triple check file paths
/www/style.css
./www/style.css
^ Notice this dot
The above are two completely differnet paths. My guess is, that the second one is the correct one and should lead to style in your specific example

unable to navigate html files in eclipse using tomcat server

I am using a Eclipse Juno with Tomcat 7.
After creating a java dynamic web project, i added a folder home folder in WebContent directory. Inside home folder i added address.jsp and h1.html.
What i was trying to do is call/link h1.html from address.jsp. I have written following code in address.jsp to do so:
Go to h1. But I am getting 404 error each time...
However when I added 1 more folder home2 in WebContent and inside home2 i added h2.html and then I finally change my code in address.jsp as:
Go to home2/h2. Now in this case I am not getting any error and h2.html is displaying properly. I wanted to know why I am not able to access html file from same directory.
Following is the hierarchy...
-------WebContent---------->
----------home----->
---address.jsp
---h1.html
----------home2----->
---h2.html
I figured it out... Instead of using Go to h1, I had to use Go to h1. I'm surprise, why am i have to mention the current directory, (in this case its home) even when I'm already in that directory. I think it only happens when we're creating web pages in Eclipse environment using Tomcat because there is no such requirement, if we are simply creating pages in some other editor like notepad or notepad++ in same folder, without using tomcat server.

How do I structure modx pages so they aren't all at the root URL, whilst being organised in a folder in the manager?

I'm developing my site in modx, and have some custom error pages that I want to group in a folder called "error", and I want them to only be accessible through domain.com/error/page.html. I've already placed the custom error pages in a container called error, which basically looks like the image below.
Only the pages are still only accessible from the root (so from domain.com/page.html), even though they are now in the "error" container. How do I change it so that when people see my error pages, they'll see the url: "domain.com/error/page.html"? Does anyone know how to do this?
p.s.: I've already figured out that I can influence the url of a page by typing the desired url in its "alias"-field. So an alias of "error/page" would mean it can be found at "domain.com/error/page.html".
But the weird thing is that this no longer works when I put the pages in an "error" folder. When I do that I can access the folder itself through domain.com/error, but no longer the pages in the folder at domain.com/error/page.html
Look in your system settings for the error page & access denied page, just set those to the IDs of the custom pages you have created. If you want custom pages for other error codes, you may have to use some redirect rules in an htaccess or apache config file. Some of them will probably never work [like 500 errors] in which case you would have to use a static html file & the server configuration to point to it.
as for setting the path - you will have to set your furls [more system settings] to "use friendly alias path'
also - clear your cache, with modx when in doubt clear the cache...