I have the need to create a page in the Alfresco Share context that should be accessible without authentication. When using the page framework it seems pretty straight forward since you can add <authentication>none</authentication> to the page definition.
When using aikau the page definitions is gone and I'm left with the get.desc.xml-webscript file which does to my knowledge does not support the authentication element. Anyone having an idea?
It looks like you are accessing your webscript through the auth-page url:
http://<ip>:<port>/<context>/page/ap/ws/<webscript>
Please note that ap in the URL stands for the authenticated page defined under the directory:
/<project-name>/src/main/webapp/WEB-INF/surf-config/pages/auth-page.xml
This section :
<config evaluator="string-compare" condition="UriTemplate">
<uri-templates>
<uri-template id="remote-node-page">/{pageid}/p/{pagename}/{store_type}/{store_id}/{id}</uri-template>
<uri-template id="remote-site-page">/site/{site}/{pageid}/p/{pagename}</uri-template>
<uri-template id="remote-page">/{pageid}/p/{pagename}</uri-template>
<uri-template id="sitepage">/site/{site}/{pageid}/ws/{webscript}</uri-template>
<uri-template id="userpage">/user/{userid}/{pageid}/ws/{webscript}</uri-template>
<uri-template id="page">/{pageid}/ws/{webscript}</uri-template> <!-- this template matches your URI which means the resolution of which page/webscript would be accessed will rely fully on it -->
</uri-templates>
</config>
of your
/<project-name>/src/main/webapp/WEB-INF/surf.xml
Defines page/webscript resolution policy based on URI-templates. For further infos on how to set/exploit page uri templates please visit this tutorial
The auth-page has authentication set USER as shown here which would result in asking for authentication before even trying to resolve the webscript
So if you want to access some aikau page in un-authenticated mode (as a guest user) you should be using the noauth-page like this:
http://<ip>:<port>/<context>/page/na/ws/<webscript>
FYI: You do not have to set your webscript authentication at all as it defaults to none when the authentication tag is not present
It's worth being aware that you can create your own template pages for Aikau. You aren't limited to the pages that are defined in either Share or clients created via the Aikau Maven Archetype (see https://github.com/Alfresco/Aikau/blob/master/tutorial/chapters/Tutorial1.md).
In Share for example you have 4 templates available out-of-the-box:
dp (Dynamic Page - what you should use in most cases)
hdp (Hybrid Dynamic Page - where the header and footer and rendered above and below the page)
rp (Remote Page - accesses a page stored on the Alfresco Repository)
hrp (Hybrid Remote Page) - accesses a remote page stored on the Alfresco Repository and renders it between the standard header and footer.
In clients created by the Aikau Maven Archetype you have:
- na (Not Authenticated) - renders a page but doesn't require a user to be authenticated
- ap (Aikau Page) - renders a page for authenticated users.
Aikau pages make use of URI templates to reduce the amount of Surf objects that are required to build a page - however you always have the option of building your own pages.
See the examples in the archetype project for reference, the no-authentication page is defined here
Both this page and the standard authenticated page both re-use the standard template type which ultimately maps to the standard page FreeMarker template
However, if you want to build your own pages and templates you can - you're not limited to using what is provided by default.
Related
I have an AEM 6.3 site which uses ACS AEM Commons 3.15.12 sitemap functionality, it's configured on publish instances to use the 'publish' externalizer domain. The rendered sitemap has the correct hostname in the sitemap URLs.
When I add an additional homepage component (for the new site) in the same sitemap config as the existing working one, keeping publish as the externalizer domain, the new site's sitemap doesn't have the new site's domain name in the generated URLs, instead it has http://localhost:4503.
The working site (sitemap) does have some /etc/map/http mappings, which I recreated in kind for the new site, but again, when using the same config (with a home page component for each site), http://localhost:4503 remained as the domain name for my new site in its ACS AEM Commons generated sitemap.xml.
I did not try creating a new config with the new site (and its home page component), using publish as the externalizer domain, and with the new mappings I created.
I did however create a new config, with the new site's homepage component, and using a custom externalizer domain, which I created to match my new site's correct domain name, and did not have any /etc/map/http maps for the new site. In this case, the generated sitemap had the correct domain name in its sitemap.xml.
I'm trying to understand what's going on. Why the different behavior in the domain names printed in the generated sitemap.xml files for each site? Also, why does ACS AEM Commons want a home page component when a path could indicate the root of a site? It makes me wonder if my new site's home page component is missing something, so as not to work (i.e. causing the ACS AEM Commons sitemap to show http://localhost:4503 instead of the site's domain name), or maybe it's mapping related, or something else?
Seeking clarity (09/08/21):
The first site in my AEM to use ACS Commons Sitemap is using "publish" (which maps to http://localhost:4503) as the externalizer domain. How is the generated sitemap for this site getting the correct domain in this case? The only other info in the ACS Commons Site Map config for this site is the sling resource type for this site's homepage component.
Additionally, there are several /etc/map/http/<xxx_site:80> entries for this site, including one for sitemap (a redirect to home.sitemap.xml). I have a feeling these entries are how the sitemap has the correct domain while only having "publish" as the externalizer domain? The protocol shows as http however, could this be changed to https by creating similar /etc/map/https entries?
Instead of creating: publish1 https://www.yourfirstdomain.com, publish2 https://www.yourseconddomain.com for additional sites as suggested (and this does seem to work), could I use the same "publish" externalizer domain, in a new/separate ACS Site Map config, as the first site does, in conjunction with similar /etc/map/http(s) entries for the additional sites/domains?
Default configuration in externalizer for "publish" domain is "http://localhost:4503".
For your new/existing domain you should first configure Day CQ Link Externalizer:
use publish1, publish2...and so on
publish1 https://www.yourfirstdomain.com,
publish2 https://www.yourseconddomain.com
After this, you can enter the respective domain (publish1, publish2,..) in ACS AEM Commons - site map servlet as externalizer domain
Does anybody have sophisticated knowledge about running a multi-domain-site using a single typo3-instance ?
E.g. I have 2 domains, both being served by the same webserver, using different vhosts. What I want to achieve, is both vhosts pointing to the same document root, where a typo3-instance is installed. This TYPO3-instance should check by typoscript, which domain was used in the request and forward requests for each domain to a specific subpage ("landing page for that domain").
I need this to work in a productional & stable environment, due to custom-self-developed extensions, which provide necessary data for both installations, also specific extbase-domain-models should be usable in both domains etc.
I am already able to check the requested domain via typoscript-conditions. What I am missing, is some info, about how I could possibly realize the redirection, without the client being redirected to the landing page each time while using sub-pages of the landing-page. Do I need to set cookies for this !?
Thanks in advance, Oliver
In TYPO3, you can combine several sites (each with a different domain) in one Installation. This already works out of the box.
So, for this requirement
This TYPO3-instance should check by typoscript, which domain was used in the request and forward requests for each domain to a specific subpage
it is not necessary to add a check for TypoScript, TYPO3 will automatically resolve the URLs.
Page Tree:
pid=0
| --> root page 1
| --> root page 2
On both root pages, enter page properties : "Behaviour" checkmark enable "Use as Root page"
On both root pages, create a TypoScript template, edit it, got to tab "Options", checkmark "Rootlevel". Have this TypoScript template include your general TypoScript configuration, e.g. via "static includes" (ideally you put your TypoScript configuration in an extension)
Since TYPO3 9: configure a site for each page tree under "Site Management > Sites". Before TYPO3 9: On both root pages create a "Domain" record
I am working on linkchecker and want to know that when AEM saves the URLs in /var/linkchecker and on what basis?
If i am opening a link,then it saves it,or it has a polling like it traverse the complete content and put it in /var/linkchecker.
Which java class help to store valid or invalid links in its storage directory?
LinkChecker is based on an eventHandler for /content (and child) nodes on creates and updates. All content is parsed and links are validated against allowed protocols and (configurable) external site links.
External Links
All the validation is done asynchronously in the background and the HTML is updated based on verification results.
/var/linkchecker is the cache for external links. The results based on simple GET requests to external links in order to optimise the process. The HTTP 200/30x response means that the links are valid. AEM looks at this cache before requesting a validation of the external link in order to optimize the page processing. This also means that the link validation is NOT real time and the delay is proportional to the load on your server.
All the links that have been checked can be seen via the /etc/linkchecker.html screen where you can request for revalidation and refresh the status of the links.
You can configure the frequency of this background check via the Day CQ Link Checker Service configuration under /system/console/configMgr. The default interval is 5 seconds (scheduler.period parameter).
Under the config manager /system/console/configMgr you will find a lot of other Day CQ Link * configurations that control this feature.
For example, Day CQ Link Checker Transformer contains config for all the elements that need to be transformed by the link checker.
Similarly Day CQ Link Checker Info Storage Service configures the link cache.
Internal Links
Internal links are ignored unless they used FQDN and external urls (which is not normally the case on author). The only exception is in a multi-tenant environment where page from one site links to another site and all the mapping information is stored in sling mappings.
I am reading thru AEM WCM and had a question that once after creating page in lower environments and publish where to check that look and feel? Is there any url to check? or will check in AEM only?
can anyone give example format url?
TKs
Have a look at the Adobe Authroing documentation, understand the concept and architecture of the AEM. As AEM is on the REST based concept implementation your page content path will be the page url (if you don't have any sling internal redirects or Dispatcher level url hiding implementations).
Just to explain you taking an geometrixx website OOTB example.
Working at author end in local instance at port 4502:
Example if you have created a test page under /content/geometrixx/en/toolbar/
the test page url will be http://localhost:4502/cf#/content/geometrixx/en/toolbar/testpage.html
preview mode can be tested appending wcmmode=disabled at the end of your url as shown below
http://localhost:4502/cf#/content/geometrixx/en/toolbar/testpage.html?wcmmode=disabled
from side kick preview option
If you have published the page (assuming your publish instance is
running at 4503 on local)
your page path will be http://localhost:4503/content/geometrixx/en/toolbar/testpage.html
If you are using touch UI then you can see the preview mode by:
Edit link: http://localhost:4502/editor.html/content/geometrixx/en/toolbar/testpage.html
Preview Link:
http://localhost:4502/content/geometrixx/en/toolbar/testpage.html?wcmmode=disabled
You should have a Replication Agent and configuration setup there to publish the pages. There is a default agent comes with AEM where you can publish the changes from author to publish environment.
I'm building a Portlet for a site powered by Liferay EE 6.0 SP1 that will suggest related or otherwise interesting content depending on what the user is currently looking at.
For example, suppose the user is on a Page that contains a Web Content Display portlet that is displaying Web Content Article 5. My portlet will contain HTML links to the Pages where the user can view Web Content Articles 6 and 7 (which contain content that is determined to be similar to the content in Web Content 5).
The problem comes in because I don't want my portlet to display HTML links to Web Content Articles 6 and 7 (assuming such a concept is even valid), I want my portlet to display links to the Pages on which those items are displayed (i.e., links to the Pages that contain Web Content Display portlets configured to show those Web Content Articles).
Is there a way to:
Associate a Web Content Article with a Page so that if I have the former, I can fetch the latter?
Or, determine the page(s) that contain portlets that display a Web Content Article?
Alternatively, if there were a way to get all portlet instances associated with a particular page, that might lead to a solution as well.
One approach to this problem appears to be to add a "Link to Page" control to the Web Content Article's Structure. Content managers can use this to create many-to-one relationships between Web Content Articles and Pages.
This solution is problematic, though, because there is no constraint on what page is selected when the Web Content is edited.
For example, a content manager might create a Web Content Article entitled "Our History", but specify the "Products" page as the value of that Article's "Link to Page" control. When the related content portlet renders the "Our History" Article, it will create a hyperlink to the "Products" page which in this case does not display the "Our History" Article anywhere.
Arguably, this could be considered a feature, but perhaps there is a better way to do it.
I afraid this is a feature that does not exist yet on Liferay. At least on Liferay pages there is an feature request on the very same topic. Dates on the discussion are on March 2011 so probably something is coming soon :)
Another solution that we are currently considering is to create a custom view mode for the portal (i.e., "VIEW", "PRINT", etc.) called "XML". When the portal detects that the browser is requesting the XML mode (similarly to how Sitecore detects which device to use), it bypasses the theme, and all portlets that support this XML mode would render their content in XML format.
The output might look something like this:
<?xml version="1.0" encoding="utf-8" ?>
<portal>
<portlet id="..." title="..." ...>
<JournalArticle>
<uuid_>...</uuid_>
...
</JournalArticle>
...
</portlet>
</portal>
A periodic process would then crawl the site in XML mode and update a Lucene index.
The obvious problem with this approach is that it requires that every portlet we use on the site be custom-developed. For various reasons (some would call it an over-ambitious creative department; I call it a significantly deficient existing feature set), we might end up having to go this route anyway.