Issue with publishing a new page in CQ5 - aem

I have installed both author and publish instances of CQ5.5 on my PC. But when I add a new page and publish it, it does not appear in the publish instance. Only a blank page is rendered.
I have tried activating it both from the siteadmin and from the Replication page in Tools. Only the navigation item appears in the Publish instance.
I checked the Request logs also. But it only gives a
200 response(OK)
Can someone please help me on this ?

You need to activate/replicate your /apps/site folder where all of your templates and components are located to push it from your author instance to your publish instance. Activating a page doesn't automatically activate the components and templates it uses.
Go to:
http://localhost:4502/etc/replication/treeactivation.html
Browse to or type /apps/[your site] in the path field
Set the check boxes to fit what you want to activate (Unchecking all will make everything under the selected path activate)
Click 'Dry Run' to see what will get activated without actually activating. (This is more of an informative step to help ensure you don't activate something not intended in a production setting)
Click 'Activate' to activate.
You can then check your publish instance to see your templates and code are there.
It is easy to miss activating your apps folder as there is no ui like the website admin for pages where you can activate.
Activating a page/folder/asset does not activate sub-pages/folders/assets. This can cause confusion especially when working with folders.
Generally if you need to activate a tree the best way is to use the tree activation utility

The only time I've ever seen this is when the code is not installed. That would be the first thing that I'd check. Go to (assuming you have your publisher on port 4503)
http://localhost:4503/crx/de
You should have your the code in /apps and you should be able to find the content page in /content too.
The reason this happens is that the sling:resourceType property points to a component that doesn't exist so it uses the default which is an empty output.

You have to build the code to both the environments (author as well as publish). This way both the environments will have the same copy of source code installed in the form of cq5 packages and felix bundles. Then if you create a new page or drop any component on any existing page, it will appear the same on publish environment after activating the same either through 'Activate Page' link in sidekick or through replication tree activation page.

Related

Disabled touch-ui but unable to find sidekick when i switched to classic-ui

Is there any way that i can do it for whole site?
For individual user instance, Go to user account settings > Preferences > Author mode, select classicUI
more info here: https://docs.adobe.com/docs/en/aem/6-3/author/author-environment/user-properties.html#Account Settings
Alternatively, to have all users of an AEM instance use the Classic UI by default, start off by going to the AEM Web Console Configuration (/system/console/configMgr). Make sure you’re signed in as an admin and do a find for “WCM Authoring UI Mode Service.” If the service is not visible, click on the OSGi button at the top followed by Configuration, and then do another find. Click on “WCM Authoring UI Mode Service” and change the “Default authoring UI mode” to “CLASSIC” (or back again to “TOUCH,” depending on what you want to do). You must enter “CLASSIC” or “TOUCH” in uppercase letters or an error message will show up when opening a site. Changing this setting will make the chosen UI the default for all sites of the AEM instance. When opening a site with /siteadmin, or /sites.html/content, the site should now open using the Classic UI. This should be the case for all users.

How do I publish just 1 HTML file in author instance of aem server?

I want to create a simple HTML file
/content/1.html
in the author instance in the aem server and publish it. How should I publish it - either through the UI or command-line is fine?
Two options for easier, to handle from browser itself,
1) Go to tree activation page and select the page path which you want to activate and click on the Activate button use the check boxes ( Only Modified, Only Activated, Ignore Deactivated) according to your need,
2) Go to crx/de console select the page that you want to activate under the content node. use the right side Replication Tab Replicate button to replicate the node.
Note that when using this node level replicate action you need to
activate all the child/individual nodes that are required to your page
content.
There are several other ways of doing replication by code, CURL, etc. as which one to use depends on your comfort levels.
package manager Image
Simplest ways are already mentioned above but i am mentioning one more way .
check it out if you are more comfortable with it.
You can replicate it or publish your file using Package manager.
1.Goto http://localhost:4502/crx/packmgr
2.Goto your package[/content/1.html] and edit it.
3.Save it and choose the replicate option under the more tab.
In the page side kick, you click on properties then "activate"

cq5 permissions problems viewing content on publish

I'm having a very interesting problem w/ content appearing on my publish instance. Let me just run down the situation and see if anyone can help.
I have an author and publish instance set up.
Authors have and still do successfully replicate items from Author to Publish with no issue.
All of my code base has been migrated over, my jars are fine -- i even rebuilt the individual jars in the publish instance crx just to make sure.
------- now for the issue.
I went to publish a new page and it did not show up on the publish instance. It's not a new template or component type, just another page to add to the list. These are the actions I took and what i found. I currently have 2 publish instances set up, but will refer to them synonymously as "publish" since their states appear to be identical.
Activated to publish -- did not show up in publish
logged into publish/crx/de/index.jsp to make sure it was replicated properly.
the content did make it fine and is in the proper path in /content
The ACL and access control permissions are the same as all the other content nodes of the same type. (Just to note, those content nodes are perfectly viewable).
No stacktrace errors in my logs. However, when going through the dispatcher I get this error: org.apache.sling.servlets.get.impl.DefaultGetServlet No renderer for extension js, cannot render resource JcrNodeResource, type=XXX, superType=null, path=/content/XXX/jcr:content
I went ahead and logged in as admin in my publish/crx/de and hit the content page in question and everything looked fine. What this means is the content is available to administrators but not anonymous users.
edit: I made sure to check the anonymous context in all 3 instances -- both publish instances directly and through dispatcher.
From here I figured it had to be an issue w/ the access control, but the new node has identical permissions to nodes that are available to the anonymous user context.
To check if it was a matter of replication, I went and deactivated some of the other similar nodes, saw they disappeared, reactived them and saw them come back. Following this train of thought I deactived the group (old nodes + my new node) and then reactived them -- all the old nodes showed up, and still the same permissions issues w/ the new node.
Is the access control available anywhere else? I'm curious if there are other places for me to look at in order to figure out what's wrong with this piece of content.
thank you,
Brodie
You can set "read" permissions for the group "everyone". Ultimately, you will want to put a dispatcher in front of your publishers, and prevent public access to your publish instances directly (preferably sitting behind a VPN).
This means that your dispatcher will be denying access to /apps anyway, and your instances will still be secure, and the ACL for the publisher won't really matter as long as an anonymous user can render the page under /content
Have you tried hitting the page directly as an anonymous user on the publisher (bypassing the dispatcher)? That would help you rule out whether it is a dispatcher issue.
This article may also help: http://forums.adobe.com/message/4263731 It include this:
"The issue was that after creating a new site on an author instance,
when viewing it on the publish site the page was not rendering
correclty. The visible symptom was that initial HTML tags (for HTML,
HEAD, META, and BODY) were being generated, but the content was not be
filled in. I did Activate my content properly, however, because it
was a new site, and I had generated new components and site templates
which resided in the "apps" folder and assets in the "etc" folder,
they were not available to be rendered and so the HTML page was blank
(because they could not be found on the publish instance). What I did
was use the "Activate Tree" under the Tools section to publish content
in /content/mysite. What I missed was using the Activate Tree to
publish items I had created in /etc/designs/mysite and /apps/mysite."
So this is on solution I found, but I don't feel like it is the best solution.
The root issue was that access control was restricted on the Views of the component. This is because /apps has a default deny to read for the "Everyone" group.
I changed this, but was told that of cq5.4 this was put in as a security precaution.
So as this fixes my problem, I fear it may introduce new ones. I'd like to get some more responses before resolving this out.
WEN U ZIP FROM PACKAGE MANAGER FOR USER AND GROUP PERMISSIONS ADD ALL THE NODES WHICH U HAVE WITH THE NAME OF "REP:POLICY"'S AND INSTALL IN NEW CQ

Unable to Edit Article After System Plugin Install

I have developed a front-end system plugin for Joomla 3.0 which replaces keywords for HTML formatted objects. This works perfectly in my local lab environment but when installed on the hosted site (WHM/cPanel) it causes issues with the administration area and prevents the administrators from editing the articles.
When the administrator clicks on a article to edit the page attempts to load then appears to go back to the same page. I have developed this as a front-end plugin only so I shouldn't affect the administration area.
The problem is also preventing admin from creating anything new (news, blogs, content, menu items etc.)
As this does not happen within my lab I can only assume the issue is with some server settings which I may need to enable/disable. I have complete administrative access to both WHM, cPanel and Joomla so can change settings where ever needed...
Things I have observed:
The article URL changes from:
/administrator/index.php?option=com_content&view=article&layout=edit&id=7
to:
/administrator/index.php?option=com_content&view=article&layout=edit&id=7
when the plugin is enabled. Notice the ampersand has changed to amp;. This makes me think it could be something to do with UTF-8 character encoding has been set in MySQL to utf8general_ci.
Any pointers on configurations I may need to change would be greatly received.
Question: How do I prevent this from occurring (without removing my essential plugin).
If you create System Plugin that should work only on front-end you have to check in your plugin if current page is front-end. You can do it using this function: JFactory::getApplication()->isSite() or JFactory::getApplication()->isAdmin()
Example usage (I assume you use onAfterRender event):
function onAfterRender() {
// Exit if current page is from Administration panel
if( JFactory::getApplication()->isAdmin() ) return;
/* your plugin main code goes here*/
}
It will prevent your plugin from modifying administration panel output. If you already done it and it does check like it should to, there is no way that reason of your problems is that plugin.

Publishing multiple sites on a single instance of umbraco

I am looking to setup a parallel site to one already that already uses umbraco for its content management system. The new site would share admins, templates, macros, and media resources, but not any content. If I setup multiple host headers pointing to the same directory with an umbraco install, how can I switch the top node (home vs home2) of the site based on which url is being accessed?
I believe you first have to change a setting in umbracosettings.config:
<useDomainPrefixes>true</useDomainPrefixes>
Then I think you also have to right click on each top node and click 'Manage Hostnames', then add the appropriate host name for that top node.
It already sounds like you have IIS configured correctly, so you should be good to go on that front.
It's been a while since I've worked with Umbraco, but I think I'm mostly right ;-)