Skip to content
Snippets Groups Projects
Commit 2cc843cc authored by megachriz's avatar megachriz Committed by MegaChriz
Browse files

Issue #2645074 by MegaChriz, MiroslavBanov: Could not retrieve title from feed...

Issue #2645074 by MegaChriz, MiroslavBanov: Could not retrieve title from feed - support Title module.
parent 2e7be18f
No related branches found
No related tags found
No related merge requests found
...@@ -604,8 +604,12 @@ function feeds_node_validate($node, $form, &$form_state) { ...@@ -604,8 +604,12 @@ function feeds_node_validate($node, $form, &$form_state) {
$last_feeds = $node->feeds; $last_feeds = $node->feeds;
$source->configFormValidate($last_feeds); $source->configFormValidate($last_feeds);
// If node title is empty, try to retrieve title from feed. // Check if title form element is hidden.
if (trim($node->title) == '') { $title_hidden = (isset($form['title']['#access']) && !$form['title']['#access']);
// If the node title is empty and the title form element wasn't hidden, try to
// retrieve the title from the feed.
if (trim($node->title) == '' && !$title_hidden) {
try { try {
$source->addConfig($last_feeds); $source->addConfig($last_feeds);
if (!$last_title = $source->preview()->title) { if (!$last_title = $source->preview()->title) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment