Publishing from Author to Public in Magnolia CMS - magnolia

I am just trying out Magnolia CMS. I have hit a stumbling block.
My steps:
Followed the hello-magnolia tutorial. That all works fine in Author (localhost) mode.
Clicked Publish (including sub-nodes)
Go to the public site (on my localhost http://localhost:8080/magnoliaPublic/Hello-Magnolia)
I get a server 500 error that looks like this:
HTTP Status 500 - javax.servlet.ServletException:
info.magnolia.rendering.engine.RenderException:
info.magnolia.registry.RegistrationException:
hello-magnolia:pages/hello
I have tried publishing EVERYTHING in Author and restarting the server, but so far the error remains.
Any help would be great.

I was able to reproduce the same error by not deploying the hello-world folder to the Magnolia public instance. I just downloaded the latest Magnolia version and the hello-world tutorial.
Most probably, you have not deployed the hello-world folder (I downloaded and unzipped the complete sample from the Magnolia wiki site) to <magnolia-5.4.7>/apache-tomcat-7.0.64/webapps/magnoliaPublic but only to <magnolia-5.4.7>/apache-tomcat-7.0.64/webapps/magnoliaAuthor.
It needs to be in both! When you publish something via Magnolia, you (usually) only publish content pages or assets, which rely on templates inside the hello-world folder, and the Magnolia public instance also needs to know about the templates it should use. magnoliaAuthor and magnoliaPublic are two separate applications, so they don't know about each other directly, nor about the templates deployed on each.
(Tomcat restart required after copying it to there.)

Related

Problem with bootstrapping pages in Magnolia 6.2

I'm trying to bootstrap page so it will be available on different servers after deployment new WAR file.
Here are steps what I did:
design MyPage page in author Page app on local dev server
open JCR App and export MyPage page as yaml and xml into tmp folder
delete existing MyPage from Page app (it's only marked as deleted)
stop server with deployed magnolia-cms-webapp
1st attempt: bootstrap as page belongs to module "myModule"
magnolia-cms-webapp\src\main\resources\META-INF\magnolia\myModule.xml
magnolia-cms-webapp\src\main\resources\mgnl-bootstrap\myModule\website.MyPage.xml
build and start server
confirm that page wasn't bootstrapped
2nd attempt: bootstrap as page in WEB-INF\bootstrap\common folder
magnolia-cms-webapp\src\main\webapp\WEB-INF\bootstrap\common\website.MyPage.xml
build and start server
confirm that page wasn't bootstrapped
I've tried both YAML and XML exported files
What else I can try?
Bootstrapping files only happens while installing a module. If the module had been already installed, adding files won't have any effect on the instance.

AWS Amplify cannot recognize new added file

New to Amplify. Following the tutorial on AWS and everything looks good.
Now I want to add a simple html file, called abc.html, just some basic html code for a test. But when I try to visit the url: https://www.yourdomain.com/abc.html, it redirects the url to https://www.yourdomain.com/abc/. So it basically doesn't recognize there is a file called abc.html. How can I add new files to Amplify?
From Amplify console, everything looks OK. It responded to the git push. Provision, build, deploy, verify are all green. It just can't recognize the new added file. Any suggestions?
I figure out the problem. Post it here in case people have the same problem.
It's a bug in Amplify web framework. If you access the file before the branch gets built and deployed, the web framework can't find the file. So it will show 404 page and record the url as 404. Later, even if you build and deploy the file through Amplify, the web framework still remembers the 404 response to the specific url. It won't refresh. That's why if you add a html file to the repo and access it before Amplify finishes deployment, the file is forever treated as not exist.

Set default page on MVC project

I'm trying to work on a project which name is Voat.
Here is the of this project https://github.com/voat/voat
I cloned the project and build it on my localhost which is "/inetpub/" folder.
Now when I'm trying to reach localhost I'm getting this error:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
So first question how can I set default page on this project?
Here is the RouteConfig.cs for Voat solution: RouteConfig.cs
and appsettings.json.
I think we need to set this https://github.com/voat/voat/blob/Core/src/Voat.UI/Views/_ViewStart.cshtml file as a Default Page but I really don't know how to do it.
There is a little instroduction for installing Voat but its outdated but it may help if you want to check it: Master Branch -outdated-
If you want to install Voat on your localhost to help me you should use the Core branch on Github. And if you success to install Voat on your localhost could you please explain me how to do it step by step? Thank you everyone already.

How to Install ServiceStack.Host.AspNet Into a Legacy Web Forms

I just installed the ServiceStack NuGet package ServiceStack.Host.AspNet into an existing legacy VB.NET Web Forms site. After cleaning, then running the project I am being prompted with this text
Forbidden
Request.HttpMethod: GET
Request.PathInfo:
Request.QueryString: ReturnUrl=%2f
Request.RawUrl: /LoginPersonal.aspx?ReturnUrl=%2f
App.IsIntegratedPipeline: True
App.WebHostPhysicalPath: < Path to website >
App.WebHostRootFileNames: [ List of every file and folder in the root of the application]
App.DefaultRootFileName: default.htm
instead of my log-in page.
What is the best approach to slowly integrate SS into the site without breaking existing functionality, yet benefiting from SS Session, Cache, ORM, and Serialization?
UPDATE
The solution that ended up working was in the wiki all along, except it was missing the step about removing the original handler created by NuGet. I have since update the wiki to reflect this use case.
-Stephen
Have you added the custom path as per this wiki article?

System.Web.Optimization bundles are empty when running in a virtual directory

I'm having problems when deploying my application to a server using a virtual directory in IIS.
I have configured the same files to run under the default website in a virtual directly and also in a new website root running on port 81. Both configurations use their own identical app pools. While the site on port 81 works fine the site running in a virtual directory doesn't load the bundles.
In the page I see links with missing versions in the URL, such as:
<link href="/MyVirtualDir/Content/css/site?v=" rel="stylesheet">
The URL returns a 200 status from the server, but the content is completely empty.
I have looked on SO at questions like this which references this bug ticket but my understanding is that this is when the files being included in the bundle are 'virtual' or not under the physical folder root. Which is not true in my case.
Cheers for any help you can give me. I can't believe that this configuration wouldn't be supported so I must be doing something wrong somewhere!
Update:
I think a ticket describing my problem has been raised on the web optimisations codeplex site here http://aspnetoptimization.codeplex.com/workitem/55 Not that this gets me any further though :(
After comparing with a new project I tracked down the problem:
I was using T4MVC (trying to be clever and not use 'magic strings' in my code). So I was using a link such as
bundles.Add(new ScriptBundle("~/Scripts/all")
.Include("~"+Links.Scripts.Library.jqueryPlugin.jquery_ui_js), ...));
When this runs under a virtual directory it will resolve with the virtual directory name in the path, so it can't find the files.
I hope this helps someone else who runs into the same problem. Also, it looks like T4MVC are looking to improve the use of magic strings in bundles in future releases. See here for a discussion

Resources