Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is authorName and where is it coming from? #9

Closed
Toflar opened this issue Mar 3, 2017 · 4 comments
Closed

What is authorName and where is it coming from? #9

Toflar opened this issue Mar 3, 2017 · 4 comments
Assignees
Labels

Comments

@Toflar
Copy link
Member

Toflar commented Mar 3, 2017

I must be blind...can anybody explain me where this line takes the author name from?

$objItem->author = $objArticle->authorName;

I cannot find the logic behind this.

@fritzmg
Copy link
Contributor

fritzmg commented Mar 3, 2017

Looks indeed like a relic from Contao 2. As a matter of fact, no author information is generated in the RSS feeds. Tested on demo.contao.org:

RSS 2.0 entry:

<item>
  <title>Contao is popular</title>
  <description><![CDATA[<p>In a recent security level comparison Contao excelled as one of the most secure Open Source CMS's.</p>]]></description>
  <link>https://demo.contao.org/en/news-detail/contao-is-popular.html</link>
  <pubDate>Mon, 17 Feb 2014 14:27:00 +0100</pubDate>
  <guid>https://demo.contao.org/en/news-detail/contao-is-popular.html</guid>
</item>

Atom entry:

<entry>
  <title>Contao is popular</title>
  <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>In a recent security level comparison Contao excelled as one of the most secure Open Source CMS's.</p></div></content>
  <link rel="alternate" href="https://demo.contao.org/en/news-detail/contao-is-popular.html" />
  <updated>2014-02-17T14:27:00+01:00</updated>
  <id>https://demo.contao.org/en/news-detail/contao-is-popular.html</id>
  <author><name></name></author>
</entry>

With the Atom entry you can see that an <author> node is in fact added to the <entry>, however it is empty.

@leofeyer
Copy link
Member

The author name should appear in the Atom feed.

@fritzmg
Copy link
Contributor

fritzmg commented Mar 14, 2017

It works in neither feed. While the Atom feed does add an <author> entry, it will be empty since authorName is a non-existant variable of the model. It should be ->getRelated('author')->name instead for example (with null check).

@leofeyer
Copy link
Member

Fixed in 9f46a7d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants