I tried to include a component in another component using following code
<%
String fakePath = resource.getPath() + "/nav-tabs";
%>
<cq:include path="<%=fakePath%>" resourceType="ven/components/navMenu"/>
When I open the site page and tried to edit the component to author data, following error is coming in the browser console and not able to see the component dialog.
widgets.js:3318 GET
http://localhost:4502/content/ven/global/en/testPage/jcr:content/nav-tabs.infinity.json?_dc=1481236797569
404 (Not Found)
I do not see any resource created below the content tree too.
Could any one shed some light on this?
Thanks,
Sri
It looks like you placing this component directly on the page, because resource.getPath() returns http://localhost:4502/content/ven/global/en/testPage/jcr:content in your case. You can use page templates to create initial content when creating the page.
For components you can use cq:template resource:
Just place cq:template resource beneath your component. As soon you add a new component it should copy the content of it into your resource (similar to page templates)
In your case: _cq_template.xml :
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="nt:unstructured">
<nav-tabs
jcr:primaryType="nt:unstructured"
sling:resourceType="ven/components/navMenu"/>
</jcr:root>
Related
I'm trying to get a sitemap working in Typo3 9.5.x. If I go to https://domain.tld/?type=1533906435 I get the following page.
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="/typo3/sysext/seo/Resources/Public/CSS/Sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://domain.tld/index.html?sitemap=pages&cHash=38eee382dd3fc2edb80b67944d477100</loc>
<lastmod>2019-10-07T13:57:04-07:00</lastmod>
</sitemap>
</sitemapindex>
So far so good. But the link in there should take me to the actual sitemap, but instead takes me straight to the root page without any redirection. This happens on 2 different sites. I didn't configure anything special, just enabled the seo system extension and included the static template as described here.
When I submitted the sitemap to Google's Search Console, it said "could not fetch", but the next day the status was "Success" and it discovered URLS. I guess Google crawled the root page and found the links on it.
How do I get the sitemap working or is there a bug somewhere?
The index.html part in the path to the pages sitemap looks weird to me.
Can you please try to open the loc url without the index.html part?
If you can see the sitemap then, we have to take a look where this index.html is coming from.
Issue image I’m having this issue when Using a standard RTE plugin hyperlink feature in AEM.
Clicking on the < ahref> links work correctly where it routes me to a correct shortened URL (/usa-en/delete/smart-factory.html) as expected.
However hovering on the link or view source of the markup generated seems to an issue where links shows an absolute path with (/content/te-com/usa/en/pages/….) which is impacting our SEO.
In fact Only the first link is getting shortened and all other links show an absolute path (/content/te-com/... path) when I hover over the links. I suspect that the cached links have an issue with the path getting shortened.
Node storage in JCR:
<p>Hello one and two. </p>
Generated HTML markup from source :
<div class="global-rte-std-bold global-labels parbase section"><p>Hello one and two. </p>
However when I add a shift + Enter when using the RTE a tag is added and the URL somehow gets shortened for all the links as expected as shown in the below markup. Node storage is still the same as above like the one without shift+enter
Markup Generated (observe that the URL's are shortened):
<div class="global-rte-std-bold global-labels parbase section"><p>Hello one and<br>two. </p>
Also we have the below rewrite rule in Apache that actually comes into effect when I click the link. I suspect the cached URL's with RTE have this issue.
RewriteRule ^/?usa-en/?(.*)$ /content/te-com/usa/en/pages/$1 [PT,QSA].
Note : We have not customized the RTE plugin and its a standard Hyperlink plugin we have been using on AEM 6.2
Code used here is a simple
I wonder how it works correctly with a shift + Enter and not when I have the links on the same line.
Any help on this would be appreciated. Thanks
When you link an internal page/asset with RTE editor then url shortening does not work. I came across the same situation and for this I had to write custom Sling rewriter to transform the link so that resourceResolver.map(path) works fine.
#Override
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
int hrefIndex = atts.getIndex("href");
String href = atts.getValue("href");
atts.setValue(hrefIndex, resolver.map(href));
}
I'm trying to put Schema.org on a website. First I made JSON-LD but the website is not allowing any script in the head element. Then I converted it into RDF/XML format below.
Now, where on the website should I put this for Google to read it. Should I put in the head element?
<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:schema="http://schema.org/">
<schema:Organization rdf:nodeID="genid1">
<schema:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">National Public Radio</schema:name>
<schema:sponsor>
<schema:Organization>
<schema:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">GloboCorp</schema:name>
<schema:url rdf:resource="http://www.example.com/"/>
</schema:Organization>
</schema:sponsor>
<schema:url rdf:resource="http://npr.org"/>
</schema:Organization>
</rdf:RDF>
If you want to include it in the HTML document, you would have to use a script element (just like with JSON-LD). This script element doesn’t have to be part of the head, you can place it in the body. An alternative is to provide the RDF/XML in its own file and link it from the head, or offer it via content negotiation.
That said, Google Search doesn’t support RDF/XML. For their search result features, which make use of Schema.org, they only support these syntaxes:
JSON-LD (in script)
Microdata
RDFa
Hello my magento store has multi-store view for diff. language. now i need to submit sitemap for all but i am not able to submit because in magento all sitemap generate under sitemap folder and sub folders based on store code.
its generate like that storewise http://www.demo.co.uk/sitemaps/de/sitemap.xml, other
http://www.demo.co.uk/sitemaps/uk/sitemap.xml
Any one have idea how to submit sitemap for all store in google webmaster ?
THanks in adavanc..
You can add a sitemap_index.xml file in the top magento folder. Then you can tell the crawler where to go.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://demo.co.uk/sitemaps/de/sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>http://demo.co.uk/sitemaps/en/sitemap.xml</loc>
</sitemap>
Before you do this update the line in robots.txt to link to your index file
Sitemap: <sitemap_location>
Does Bing allow images in their sitemaps like Google?
Please see the Google example below:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<url>
<loc>http://www.example.com/foo.html</loc>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
</url>
</urlset>
It's Google the only search engine currently which supports Image sitemaps. The other search engines may successfully parse these sitemaps but they will likely ignore the tags related to the Image sitemap extension.
Note that in your example there's an error, and is likely that this is what causes parsing difficulties for Bing. The Image schema hub is located at http://www.google.com/schemas/sitemap-image/1.1/
That is, you need to replace the following bit:
xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1"
with
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"