The tests are currently failing with the following message:

Metatag.MetatagCoreNodeTest
✗	
token_tokens
exception: [User warning] Line 912 of sites/all/modules/token/token.tokens.inc:
Attempting to perform token replacement for token type date without required data
(repeated)

Add the Date module to see if that can get past the problem.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new655 bytes

This adds the dependency.

damienmckenna’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
damienmckenna’s picture

Title: Add Date as a test dependency » Fix tests in 7.x-1.x branch

  • DamienMcKenna committed 30f09e5 on 7.x-1.x
    Issue #3271006 by DamienMcKenna: Add the Date module as a test...
damienmckenna’s picture

Status: Needs review » Needs work

Committed.

Now to see if enabling the Date module fixes the problem.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new948 bytes

Does this work?

Status: Needs review » Needs work

The last submitted patch, 7: metatag-n3271006-7.patch, failed testing. View results

damienmckenna’s picture

The "date" token type comes from system.tokens.inc:

function system_token_info() {
  $types['site'] = array(
    'name' => t("Site information"),
    'description' => t("Tokens for site-wide settings and other global information."),
  );
  $types['date'] = array(
    'name' => t("Dates"),
    'description' => t("Tokens related to times and dates."),
  );

So in theory this should always be present.

I would not be surprised if this was caused by a core bug in core.

  • DamienMcKenna committed 3baa079 on 7.x-1.x
    Revert "Issue #3271006 by DamienMcKenna: Add the Date module as a test...
damienmckenna’s picture

I reverted the test dependency addition.

damienmckenna’s picture

I wonder if the problem is #1934192?

damienmckenna’s picture

The last test that succeeded was last October: https://dispatcher.drupalci.org/job/drupal_d7/166123/console

The main differences, besides months of changes to Drupal core, are:
* ctools 7.x-1.19 instead of 1.20
* entity 7.x-1.9 Instead of 1.10
* entity_translation 7.x-1.1 instead of 2.0
* file_entity 7.x-2.32 instead of 2.36
* token 7.x-1.8 instead of 1.9

damienmckenna’s picture

Interestingly enough I cannot reproduce the problem locally - the test that fails on drupalci runs just fine for me.

feyp’s picture

When running just MetatagCoreNodeTest.test I'm seeing the same exceptions locally in verbose mode:

Pass      Browser    MetatagCoreNodeTe  440 MetatagCoreNodeTest->checkNodePrevi
    Valid HTML found on "http://localhost/node/add/article"
Pass      Browser    MetatagCoreNodeTe  441 MetatagCoreNodeTest->checkNodePrevi
    HTTP response expected 200, actual 200
Exception User warni token.tokens.inc   912 token_tokens()                     
    Attempting to perform token replacement for token type date without required
    data
Pass      Browser    MetatagCoreNodeTe  454 MetatagCoreNodeTest->checkNodePrevi
    POST http://localhost/node/add/article returned 200 (44.01 KB).
feyp’s picture

StatusFileSize
new538 bytes
new689 bytes

Could this possibly have been introduced by #2128055: Files should be uploaded to per year/month directories by default? If the tests are only run on commit, this would also fit your timeline, it was released in December and the last commit before that was in October.

Attached are two patches, that are probably not the final solution (especially the 2nd one), but let's see, if that would fix the problem.

I hope you don't mind me working on this even though you had this assigned to yourself. I thought that since you couldn't reproduce locally, I might as well have a look. If it's not helpful, just let me know.

Backtrace:

#0  token_tokens() called at [includes/module.inc:965]
#1  module_invoke_all() called at [includes/token.inc:178]
#2  token_generate() called at [includes/token.inc:87]
#3  token_replace() called at [modules/file/file.field.inc:588]
#4  file_field_widget_uri() called at [modules/file/file.field.inc:483]
#5  file_field_widget_form() called at [modules/image/image.field.inc:332]
#6  image_field_widget_form() called at [modules/field/field.form.inc:112]
#7  field_default_form() called at [modules/field/field.attach.inc:209]
#8  _field_invoke() called at [modules/field/field.attach.inc:385]
#9  _field_invoke_default() called at [modules/field/field.attach.inc:574]
#10 field_attach_form() called at [modules/node/node.pages.inc:326]
#11 node_form() called at [includes/form.inc:844]
#12 drupal_retrieve_form() called at [includes/form.inc:465]
#13 drupal_rebuild_form() called at [includes/form.inc:976]
#14 drupal_process_form() called at [includes/form.inc:386]
#15 drupal_build_form() called at [includes/form.inc:131]
#16 drupal_get_form() called at [modules/node/node.pages.inc:78]
#17 node_add() called at [includes/menu.inc:527]
#18 menu_execute_active_handler() called at [index.php:21]

With arguments (only the first 4 steps):

#0  token_tokens(date, Array ([custom:Y] => [date:custom:Y],[custom:m] => [date:custom:m]), Array (), Array ([sanitize] => 1)) called at [includes/module.inc:965]
#1  module_invoke_all(tokens, date, Array ([custom:Y] => [date:custom:Y],[custom:m] => [date:custom:m]), Array (), Array ([sanitize] => 1)) called at [includes/token.inc:178]
#2  token_generate(date, Array ([custom:Y] => [date:custom:Y],[custom:m] => [date:custom:m]), Array (), Array ([sanitize] => 1)) called at [includes/token.inc:87]
#3  token_replace([date:custom:Y]-[date:custom:m], Array ()) called at [modules/file/file.field.inc:588]
#4  file_field_widget_uri(Array ([indexes] => Array ([fid] => Array ([0] => fid)),[settings] => Array ([uri_scheme] => public,[default_image] => ,[display_field] => 0),[storage] => Array ([type] => field_sql_storage,[settings] => Array (),[module] => field_sql_storage,[active] => 1,[details] => Array ([sql] => Array ([FIELD_LOAD_CURRENT] => Array ([field_data_field_image] => Array ([fid] => field_image_fid,[alt] => field_image_alt,[title] => field_image_title,[width] => field_image_width,[height] => field_image_height)),[FIELD_LOAD_REVISION] => Array ([field_revision_field_image] => Array ([fid] => field_image_fid,[alt] => field_image_alt,[title] => field_image_title,[width] => field_image_width,[height] => field_image_height))))),[entity_types] => Array (),[translatable] => 0,[foreign keys] => Array ([fid] => Array ([table] => file_managed,[columns] => Array ([fid] => fid))),[id] => 4,[field_name] => field_image,[type] => image,[module] => image,[active] => 1,[locked] => 0,[cardinality] => 1,[deleted] => 0,[columns] => Array ([fid] => Array ([description] => The {file_managed}.fid being referenced in this field.,[type] => int,[not null] => ,[unsigned] => 1),[alt] => Array ([description] => Alternative image text, for the image's 'alt' attribute.,[type] => varchar,[length] => 512,[not null] => ),[title] => Array ([description] => Image title text, for the image's 'title' attribute.,[type] => varchar,[length] => 1024,[not null] => ),[width] => Array ([description] => The width of the image in pixels.,[type] => int,[unsigned] => 1),[height] => Array ([description] => The height of the image in pixels.,[type] => int,[unsigned] => 1)),[bundles] => Array ([node] => Array ([0] => article))), Array ([label] => Image,[description] => Upload an image to go with this article.,[required] => ,[settings] => Array ([file_directory] => [date:custom:Y]-[date:custom:m],[file_extensions] => png gif jpg jpeg,[max_filesize] => ,[max_resolution] => ,[min_resolution] => ,[alt_field] => 1,[title_field] => ,[default_image] => 0,[user_register_form] => ),[widget] => Array ([type] => image_image,[settings] => Array ([progress_indicator] => throbber,[preview_image_style] => thumbnail),[weight] => -1,[module] => image),[display] => Array ([default] => Array ([label] => hidden,[type] => image,[settings] => Array ([image_style] => large,[image_link] => ),[weight] => -1,[module] => image),[teaser] => Array ([label] => hidden,[type] => image,[settings] => Array ([image_style] => medium,[image_link] => content),[weight] => -1,[module] => image)),[id] => 6,[field_id] => 4,[field_name] => field_image,[entity_type] => node,[bundle] => article,[deleted] => 0)) called at [modules/file/file.field.inc:483]
damienmckenna’s picture

Assigned: damienmckenna » Unassigned

Thank you, I really appreciate it.

damienmckenna’s picture

A related core issue: #1173706

damienmckenna’s picture

damienmckenna’s picture

StatusFileSize
new722 bytes

Let's pull it out a bit further.

damienmckenna’s picture

Status: Needs work » Needs review
damienmckenna’s picture

Title: Fix tests in 7.x-1.x branch » Tests break due to change in core's default file field path settings
Status: Needs review » Fixed

Committed. Thanks FeyP!

  • DamienMcKenna committed bc1a2ca on 7.x-1.x authored by FeyP
    Issue #3271006 by DamienMcKenna, FeyP: Tests break due to change in core...
joseph.olstad’s picture

I have the same issue in the media module

down from 4 errors to just 1 now
having problems figuring out the last error.

#3272112: MEDIA - Tests break due to change in core's default file field path settings

Status: Fixed » Closed (fixed)

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