Problem with bootstrapping pages in Magnolia 6.2 - magnolia

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.

Related

What are valid page names in Next.js? And how does it distinguish between pages and static resources?

I'm new to Next.js and am trying to get my head around client side and server side routing and what files need to be made available to download when Next.js is configured to use server-side rendering.
When I do a production build of a Next.js project, a .next directory is created (details here). When I call next start and then load a page that uses SSR (by defining getServerSideProps()) then I can see in the developer console that the page that I load downloads resources that are prefixed _next (e.g. <script src="/_next/static/chunks/main-3123a443c688934f.js" defer=""></script>).
Can someone confirm whether the .next directory contents (.next/server/**, .next/static/**) are just made available on the server by being renamed to _next?
I tried creating a new page in a file called _next.js as an experiment. The project builds correctly (no errors reported and there are build artifacts created with the same naming convention as the other pages). However, when I try to load that page, I get a 404.
Are there restrictions on what constitutes a validly named page in Next.js? If so, what are they and where is this defined.
How does the Next.js server know what is a static resource that should just be given to the client and what is a page for which Next.js should render an output? Is it simply an algorithm like "if the path starts _next/ then return what is requested, otherwise render?"
How does Next.js know to distinguish between resources that are in the public directory and pages? e.g. if there's a collision between the name of a page and a resource in the public folder, how does the server know what to return to the user?

Netbeans step through out of project tree files for debugging (PHP)

I am writing a Wordpress plugin that depends on another plugin with netbeans.
The project is just containing the files of my plugin and I want to keep it that way to have a clean git repository.
The problem:
I rely on another plugin and want to understand how that plugin works. For this, I want to "step through" the other plugin.
I want to do this on my localhost configuration.
I have basically two destinations:
The project is in my home directory in my github folder
The server files are under c:\wamp64\www\wordpress ...., where the localhost is running
The project is essentially set up correctly to copy files from my github directory to the localhost path (Properties -> Sources)
Then:
I set an include path to the localhost -> wordpress folder in the project properties, and when I now search for a definition in my code that refers to the other plugin, the corresponding file is opened (did not work before setting the include path)
Debugging essentially works, but when I step into a function of the other plugin, the bar becomes grey and the corresponding file is not opened.
Can I change some setting for netbeans to open up the other file (not in the project tree) and step through it?
I have found a reasonable workaround.
I just created a new PHP project in Netbeans with existing sources.
As source, I used the entire wordpress installation in the wamp server path, i.e. c:\wamp64\www\wordpress
I can now 'debug' and step through this new project, but I also need to add the corresponding breakpoints in the files from the server path.
It requires some discipline as I have to open the files from my plugin twice, once in the server path and once in the project path, but only edit the files in the project path.
It works 'ok', but I would still be interested to hear if someone has a more proper solution to this.

Publishing from Author to Public in Magnolia CMS

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.)

ASP.NET MVC application root changes on submit

I've got a simple ASP.NET MVC application for CSV file validation. The user enters some characteristics about the file (text box and some checkboxes), then browses to the file they want to upload and hits submit. The entire application works fine on my local machine and also on an internal web server, but does not work when placed in the external hosting environment. Below are the details.
Originally the file contents on my machine were copied out to the server. This means that bundling of the CSS and JS was not enabled. The application page would render just fine and the submit would also work. However, after submitting the file, the application root changes.
I've been checking the application root with the following code places inside the view.
var applicationpath = '#Url.Content("~/")';
The path is correctly output as something like the following when it's rendered for the first time.
var applicationpath = '/folder1/folder2/folder3/appfolder/';
After submitting the file, it changes to.
var applicationpath = '/folder1/folder2/folder3/';
I've checked with the hosting provider and they've got the application set up on "appfolder" and "folder3" is just a directory in IIS and not set up as an application.
The form in the MVC view is set up to post in the following way.
#using (Html.BeginForm("Upload", "Home", FormMethod.Post, new { enctype = "multipart/form-data", id = "wizard" }))
Since the path changes, this obviously messes up any #Url.Action,#Html.ActionLink, and other Razor methods that are supposed to automatically map to the root. The odd thing is that the CSS and JS files continue to be mapped in the rendered output.
After all of that, I decided to try to Publish the application through Visual Studio to a local file folder and then copy the results out to the hosting provider. This enabled bundling for the CSS and JS files. Now when I go to the root of the application, none of the CSS or JS is pulled down. I've tried grabbing the path to the bundled JS or CSS files and putting that in the browser, but I get a 404 error. The rendered output looks like this:
<link href="/folder1/folder2/folder3/appfolder/Content/css?v=J7SZFaeCsOxTbb847HlSpnWlcb1lMDolldSj5wq-hdc1" rel="stylesheet"/>
Needless to say, I'm at a loss. I've asked the hosting provider to tell me what IIS features they have installed and they have. See below.
IIS Features 1
IIS Features 2
The 3rd party was able to give me RDP access to the server. I turns out that they were using URL Rewrite in IIS and some of the rules were interfering with the MVC application. After they disabled the rules for the application folder, everything worked as it should.

Display Error in Oracle Apex Application

I have exported my oracle apex application and install on another computer. I used css file written by me on my application and also i have change some settings in Theme that i have used for my application. I have exported and installed that css file and theme also. but when i run my application, it is not display correctly. it display only Texts and Images that i have used in application. Theme is missing. but my Login page is display correctly. because it is not using my Template. Login page using Login Template in oracle apex. after logged, when i browse other pages in my application, they are not displaying correctly. Theme is missing on those pages.
The issue is with my Template. but i have imported it in to apex application.
How could i solve this ?
UPDATED
When i open the Developer Tools in my browser(chrome), in Matched CSS Rules section in Elements Tab, display only user agent stylesheet. there is no my stylesheet.
Check your theme templates you changed and see if they are really correct and contain the reference to your custom stylesheet(s)
Check the output of a page you know should have the stylesheet reference
Where do you store the stylesheet? Workspace files, Application files, or simply in the "/i/" (#IMAGE_PREFIX#) folder?
if the latter: did you copy over your stylesheet and is it in the correct location? You say you imported the application to another computer, so you might have simply forgotten to copy over those files.
What is your Apex version ?
How do you load your CSS files ? They are stored on the server (accessible using the image prefix #IMAGE_PREFIX#), loaded into the database (accessible using #WORKSPACE_IMAGES#) or stored on an external server (accessible using the full URL) ?
When you say "install on another computer", you mean load your application into another apex installation right ? Then are you sure the server is configured as the other one (especially image prefix) ?
Have you checked that templates are the same in the two applications ?
Use the console in Chrome or Firefox to check if there are any errors on your page, such as CSS files that can't be loaded.

Resources