Verify that meta tags are output for entities according to the field defaults.

CommentFileSizeAuthor
#6 metatag_field-defaults_2569043-6.patch1.77 KBmichelle

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

I've confirmed this isn't working as intended, there must have been an API change at some point.

damienmckenna’s picture

Yes, an API change caused this: https://www.drupal.org/node/2546598

damienmckenna’s picture

Title: Verify that field defaults work for existing entities » Field defaults don't work for existing entities, core API change
Category: Bug report » Task
damienmckenna’s picture

Category: Task » Bug report
michelle’s picture

Status: Active » Needs review
StatusFileSize
new1.77 KB

I made the API change but that didn't completely fix the problem. The original code (stepping back to before the accidentally committed debug code) simply checked to see if $tags was empty, which it isn't unless it's totally not there. If the values are just not set on the node itself, it doesn't fall back to the field values. I changed it so it gets the defaults and then overwrites those with the node's values so that it will always fall back to the field defaults if there are no settings on the node.

Status: Needs review » Needs work

The last submitted patch, 6: metatag_field-defaults_2569043-6.patch, failed testing.

The last submitted patch, 6: metatag_field-defaults_2569043-6.patch, failed testing.

The last submitted patch, 6: metatag_field-defaults_2569043-6.patch, failed testing.

The last submitted patch, 6: metatag_field-defaults_2569043-6.patch, failed testing.

The last submitted patch, 6: metatag_field-defaults_2569043-6.patch, failed testing.

michelle’s picture

00:36:19 PHP Notice: Undefined variable: classes in /opt/drupalci_testbot/src/DrupalCI/Plugin/BuildSteps/publish/JunitXMLFormat.php on line 144
00:36:19 PHP Warning: Invalid argument supplied for foreach() in /opt/drupalci_testbot/src/DrupalCI/Plugin/BuildSteps/publish/JunitXMLFormat.php on line 169
00:36:19 Reformatted test results written to /var/lib/drupalci/web/jenkins-default-20894/artifacts/xml/testresults.xml
00:36:19 Recording test results
00:36:22 ERROR: Publisher 'Publish JUnit test result report' failed: None of the test reports contained any result
00:36:22 Finished: FAILURE

I haven't the foggiest idea what to do about these test errors. Does that mean something is wrong with my code or with the testbot?

damienmckenna’s picture

Status: Needs work » Fixed

Committed.

damienmckenna’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.