Comments

hansfn’s picture

Status: Active » Needs review
StatusFileSize
new972 bytes

Patch attached.

PS! I do realize that there are other issues with the current code under Drupal 8. However, this patch is a first start so you at least can enabled the module in Drupal 8. I might provide more patches for the other issues.

Blooniverse’s picture

StatusFileSize
new239 bytes

Added the YAML-key 'type' to the file now. Strange, my Git tracks the deletion of the old .info-file, but does NOT record the creation of the new .info.yml-file. Any good hints are welcome!

Anyhow, attached you will find the compressed file itself, and below is the code. Sorry, currently no Git patch.

name: Token
description: Provides a user interface for the Token API and some missing core tokens.
core: 8.x
type: module
files:
  - token.test
Blooniverse’s picture

Title: Convert .info to .info.yml file » Convert .info to .info.yml file, add YAML-key 'type'
Blooniverse’s picture

Category: bug » task
hansfn’s picture

Status: Needs review » Needs work

So, there is one other user trying to run the Token module on D8 ;-)

The info file is still not correct, because tests are autoloaded now. I didn't remove the files statement from the info.yml file since it also means moving token.test to the correct directory (for autoloading) and possibly rewriting the test. I might have time to look at it later.

Blooniverse’s picture

... yep ("another user")!
Testing is another labour-intensive area, indeed. And, the existing Token test looks, at first glance, quite extensive already. How much effort, do you think, is it to convert it from D7 to D8?

elachlan’s picture

Title: Convert .info to .info.yml file, add YAML-key 'type' » Token Drupal 8 port
StatusFileSize
new82.94 KB

Firstly, your patch for git will not include files that you don't "add" first. When you get a "diff" you must first add all the files you created to git. It's a bit weird. I messed up a few times.

Now down to business. Here is a patch with a few preliminary changes. I have not tested it yet and I doubt it works fully yet.

If you want to get into it a bit more there is a guide here: https://drupal.org/node/1911346

It is worth a read and possibly the 50min to watch the video.

Token is required by quite a few modules, so we should get the ball running.

elachlan’s picture

Also just a side note, patches will not test against the branch until the branch can pass all tests. So you should do testing using the testing module from core until we have a stable build. Then we can start doing testing on the patches.

elachlan’s picture

Tag isn't really appropriate.

elachlan’s picture

StatusFileSize
new86.86 KB

Newer Patch.

elachlan’s picture

Assigned: hansfn » Unassigned
geerlingguy’s picture

Issue tags: +D8CX

Updating tag to match what other contrib modules seem to be using.

elachlan’s picture

If someone wants to take over on this, go for it. I am tied down with lots of other conversions at the moment.

larowlan’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Needs work » Active

Working on this at DrupalSouth sprint, using github as sandbox: https://github.com/larowlan/token

larowlan’s picture

Status: Active » Needs review
StatusFileSize
new175.52 KB
new62.87 KB

We're ready to look at merging this back into the token repo.
Current sandbox is http://github.com/larowlan/token.

Patch against 7.x-1.x is attached, setting do not test cause its a) for 8.x and b) testing on contrib for d8 is borked because of #2171683: Remove all Simpletest overrides and rely on native multi-site functionality instead

We've used clean commit messages like so in the sandbox, so merge is better than patch™ - eg
Issue #1962358 by grom358: Fixed TokenNodeTestCase

To merge - apologies if this is obvious

git remote add github https://github.com/larowlan/token.git
git fetch github
git checkout -b 8.x-1.x github/8.x-1.x
git push origin 8.x-1.x

Screenshot of tests passing:

Now we need manual testers.

Note no work done on the field formatter integration.

larowlan’s picture

penyaskito’s picture

JFYI, I'm working on larowlan's sandbox getting up to date with core latest changes and converting routes to controllers.

penyaskito’s picture

Added token.local_tasks.yml and other D8 changes upgrades in the sandbox.

David Hernández’s picture

Status: Needs review » Needs work

I have prepared a clean install of D8 with devel and token (from github) to test this. I've only reviewed the workflow of content types and content. Here are the steps I followed:

I've created a content type and when I tried to add a field (text area) I got a WSOD with this error message:

PHP Fatal error:  Cannot use object of type Drupal\\field\\Entity\\FieldConfig as array in /var/www/d8/modules/token/token.module on line 673, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP Stack trace:, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   1. {main}() /var/www/d8/index.php:0, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   2. drupal_handle_request() /var/www/d8/index.php:15, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   3. Drupal\\Core\\DrupalKernel->handle() /var/www/d8/core/includes/bootstrap.inc:1594, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   4. Drupal\\Core\\HttpKernel->handle() /var/www/d8/core/lib/Drupal/Core/DrupalKernel.php:284, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   5. Symfony\\Component\\HttpKernel\\HttpKernel->handle() /var/www/d8/core/lib/Drupal/Core/HttpKernel.php:65, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   6. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() /var/www/d8/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:66, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   7. call_user_func_array() /var/www/d8/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:126, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   8. Drupal\\Core\\Controller\\HtmlPageController->content() /var/www/d8/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:126, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP   9. Drupal\\Core\\Controller\\HtmlPageController->getContentResult() /var/www/d8/core/lib/Drupal/Core/Controller/HtmlPageController.php:53, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP  10. call_user_func_array() /var/www/d8/core/lib/Drupal/Core/Controller/HtmlPageController.php:76, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP  11. Drupal\\Core\\Controller\\FormController->getContentResult() /var/www/d8/core/lib/Drupal/Core/Controller/HtmlPageController.php:76, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP  12. Drupal\\Core\\Form\\FormBuilder->buildForm() /var/www/d8/core/lib/Drupal/Core/Controller/FormController.php:81, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP  13. Drupal\\Core\\Form\\FormBuilder->prepareForm() /var/www/d8/core/lib/Drupal/Core/Form/FormBuilder.php:235, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP  14. Drupal\\Core\\Extension\\ModuleHandler->alter() /var/www/d8/core/lib/Drupal/Core/Form/FormBuilder.php:787, referer: http://d8.local/admin/structure/types/manage/content_type/fields
PHP  15. token_form_field_ui_field_edit_form_alter() /var/www/d8/core/lib/Drupal/Core/Extension/ModuleHandler.php:406, referer: http://d8.local/admin/structure/types/manage/content_type/fields

Ignoring the error, the text area field is created correctly.

I try to create a node and is created correctly.

I go to node/[node id] and I can view the node correctly.

After creating the node I go to node/[node:id]/devel/token to see if the tokens are correct. Most of them look correct but I see some weird things (maybe because I'm not enough used to the new version of the module).

I see some tokens like this: [node:author:created:custom:?] (note the question mark at the end). They don't have any value and I don't know what are they. [node:author:created:custom] exists and have the correct value.

The rest of the tokens that appear look correct, but I can't find the tokens for the custom fields I created. The body, title and the rest of the data is there, but not the custom fields, maybe due to the WSOD found before.

I don't find anything else on the devel/token page.

I try to delete the node and it works fine.

I try to delete the content type and is deleted correctly.

dave reid’s picture

Aside from things being needs work currently, I'm a bit concerned that it seems like the branches have diverged significantly since the fork point (https://github.com/larowlan/token/commit/ad58414f207e85d17d14d5928e0a11f...) with 20 commits in 7.x-1.x that do not seem to be reflected in the 8.x code. Shouldn't these be brought forward before I can merge this in?

dave reid’s picture

StatusFileSize
new46.77 KB

Things I've noticed:

  • admin/help/token page missing.
  • Field help text issues: "This field supports tokens" appears twice and missing browse tokens dialog link.
  • "This field supports tokens." missing on block titles. Token replacement inside block titles doesn't seem to be working.
  • The 'Token' view mode not created for entity types that are created/discovered after Token module is enabled.
dave reid’s picture

token.routing.yml:
I think the TokenCacheController should probably be using requirements:_csrf_token: 'TRUE'?

token.services.yml:
Looking at examples in core, it seems that arguments: [cache_token] should actually be arguments: [token]? I don't see anything else using cache_ in the arguments. Confirmed that this makes a cache_cache_token table instead of the desired cache_token. And looks like the service name should be cache.token instead of cache.cache_token?

berdir’s picture

Created a pretty large pull request at https://github.com/larowlan/token/pull/15 that fixes quite some stuff, most tests (except two, something with block label validation and different comment URL's) are now green but they're pretty lacking..

Also merged in the 7.x-1.x branch, had a lot of weird merge conflicts, tried to get the dialog UI with CSRF protection loaded, which works now and it loads, but it looks broken, there's some theming missing.. could use some help there ;)

hass’s picture

Thanks for porting. I'm testing on latest github code.

Doing manual test on Google Analytics. Is it intentional that the "Browse available tokens." popup is not shown in center of viewport? It is shown on right/bottom. It also scrolls outside of the viewport if the page get's longer.

Got some errors if form is saved with an unknown token. You just need to enter a token like [current-user:role-ids2222] in custom dimensions and hit save and you get this:

Strict Standards: Only variables should be passed by reference in modules\token\token.module on line 635
Catchable fatal error: Argument 2 passed to Drupal\Core\Form\FormBuilder::setError() must be of the type array, string given, called in modules\token\token.module on line 635 and defined in core\lib\Drupal\Core\Form\FormBuilder.php on line 817
hass’s picture

Hello maintainers? Are you there? :-)

Can we commit the latest code to D8 and create a DEV, please? I would be happy if my tests no longer fail and test robot will be able to download the latest well working code...

dave reid’s picture

I was trying to wait until at least the UI functionality was semi-working, but I do have plans to merge it to the proper 8.x branch soon.

hass’s picture

Do you mean the missing link in #21 or what else is not working? It's a bit easier to follow up with minor corrections if the large stuff has been committed, isn't it? Can someone write a summary, what is currently known to be broken? As noted... The stuff I found is not really blocking development of my modules, but the missing branche make all tests fail on d.o :-(

Anonymous’s picture

Does the module support entities out of the box yet?

hass’s picture

@Dave: Do you have an idea how far away these "soon" is?

hass’s picture

I guess this is caused by anything inside token:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "view_mode" entity type does not exist. in Drupal\Core\Entity\EntityManager->getDefinition() (line 243 of drupal8\core\lib\Drupal\Core\Entity\EntityManager.php).
Drupal\Core\Entity\EntityManager->getDefinition('view_mode')
Drupal\Core\Entity\EntityManager->getHandler('view_mode', 'storage')
Drupal\Core\Entity\EntityManager->getStorage('view_mode')
token_install()
call_user_func_array('token_install', Array)
Drupal\Core\Extension\ModuleHandler->invoke('token', 'install')
Drupal\Core\Extension\ModuleHandler->install(Array, 1)
Drupal\simpletest\WebTestBase->setUp()
Drupal\google_analytics\Tests\GoogleAnalyticsCustomDimensionsAndMetricsTest->setUp()
Drupal\simpletest\TestBase->run()
_simpletest_batch_operation(Array, '4', Array)
call_user_func_array('_simpletest_batch_operation', Array)
_batch_process()
_batch_do()
_batch_page(Object)
Drupal\system\Controller\BatchController->batchPage(Object)
call_user_func_array(Array, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
karolus’s picture

I have D8 Beta 1 running, and would love to help. Are there any releases to test at this point?

berdir’s picture

The current state can always be found here: https://github.com/larowlan/token

Based on https://travis-ci.org/larowlan/token, tests are not very happy right now, due to the url() changes, among other reasons.

karolus’s picture

Thanks--
Just pulled the latest from git, installed on my D8 Beta 2 setup, flushed caches. So far, no anomalies detected.

I know what you mean about changes to core--a theme I downloaded won't display its included info in the HTML head now in Beta2, but did in 8.0 due to the ever-changing code.

If there is anything specific to test at this point, I'd be happy to help.

huma2000’s picture

Great!! waiting for a semistable release that I can try on my dev site! Good work!

elachlan’s picture

Is it possible to get a dev release so that we can tag issues? It would make the meta game a little easier. It might also get more people involved.

ebeyrent’s picture

+1 on the dev release here.

Anonymous’s picture

Yep, that would be nice.

rru’s picture

On installing token in drupal 8 beta 4, I get a white screen of death (MAMP 3.0.7.2 / PHP 5.6.2).

php_error.log:
PHP Fatal error: Call to undefined function current_path() in .../modules/token/token.module on line 32

If I comment (remove) the function "token_help" containing the call to current_path(), everything works fine so far.

sachbearbeiter’s picture

+1 on the dev release here.

toamit’s picture

+ 1 for dev release. thanks for making the effort

dave reid’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

I've opened the dev release back up so we can file issues for it for fixing things. Will wait on patches to be submitted back.

larowlan’s picture

Status: Needs work » Needs review
StatusFileSize
new217.05 KB

Here's the current state on the github repo

Status: Needs review » Needs work

The last submitted patch, 43: token.d8.1.patch, failed testing.

berdir’s picture

  1. index 0000000..62e4acc
    --- /dev/null
    
    --- /dev/null
    +++ b/.travis.yml
    

    I guess we should remove this from the patch?

  2. +++ b/README.md
    @@ -0,0 +1,3 @@
    +# Token [![Build Status](https://travis-ci.org/larowlan/token.svg?branch=8.x-1.x)](https://travis-ci.org/larowlan/token)
    

    And this?

@Dave: What is your plan exactly? Get the current patch in asap and then continue in issues, get some reviews first to identify missing parts, ...?

dave reid’s picture

Yes, I'd like to review this within the next day or so for anything major, learn from the port, and start filing issues for anything outstanding or regressions, like you said.

Thanks to everyone that's been working on this for so long, and sorry I've taken a while to make the effort to get this merged back in.

dave reid’s picture

  1. +++ b/src/Controller/TokenCacheController.php
    @@ -0,0 +1,54 @@
    +    return $this->redirect($request->attributes->get(RouteObjectInterface::ROUTE_NAME), $request->attributes->get('_raw_variables', array()));
    

    Wow, this 'redirect to the next destination' code makes me incredibly sad. Not a comment on porting code, but D8DX.

  2. +++ b/token.drush.inc
    @@ -0,0 +1,22 @@
    +<?php
    +
    +/**
    + * @file
    + * Drush integration for the Token module.
    + */
    +
    +/**
    + * Implements hook_drush_cache_clear().
    + */
    +function token_drush_cache_clear(&$types) {
    +  if (function_exists('module_exists') && module_exists('token')) {
    +    $types['token'] = 'drush_token_cache_clear_token_info';
    +  }
    +}
    +
    +/**
    + * Clear caches internal to Token module.
    + */
    +function drush_token_cache_clear_token_info() {
    +  token_clear_cache();
    +}
    

    This appears to be new. We should have a ticket to add this to D7. Are there any new features I should know about that we're missing currently from the D7 code that are in the D8 code?

  3. +++ b/token.libraries.yml
    @@ -0,0 +1,24 @@
    +token:
    +  version: VERSION
    

    This seems wrong since the version of our contrib library shouldn't be tied to the core version.

  4. +++ b/token.tokens.inc
    @@ -957,12 +978,9 @@ function token_tokens_alter(array &$replacements, array $context) {
    -          // http://drupal.org/node/1185842 was fixed in core release 7.9.
    -          if (version_compare(VERSION, '7.9', '<')) {
    -            $account = user_load($node->uid);
    -            $name = format_username($account);
    -            $replacements[$original] = $sanitize ? check_plain($name) : $name;
    -          }
    +          $account = user_load($node->uid->value);
    +          $name = $account->getUsername();
    +          $replacements[$original] = $sanitize ? String::checkPlain($name) : $name;
    

    I think this can just be removed since it was fixed in D8 as well.

  5. +++ b/token.tokens.inc
    @@ -975,12 +993,9 @@ function token_tokens_alter(array &$replacements, array $context) {
    -          // http://drupal.org/node/978028 was fixed in core release 7.7.
    -          if (version_compare(VERSION, '7.7', '<')) {
    -            $account = user_load($file->uid);
    -            $name = format_username($account);
    -            $replacements[$original] = $sanitize ? check_plain($name) : $name;
    -          }
    +          $account = user_load($file->uid->value);
    +          $name = $account->getUsername();
    +          $replacements[$original] = $sanitize ? String::checkPlain($name) : $name;
    

    Same here, can just all be removed.

berdir’s picture

Ok, I'll see if I can do the same. I noticed quite a few things as well from scanning through the patch, there's still a hook_menu() will old stuff in it, and some controller classes look completely bogus right now..

There are two open pull requests for known issues, one is templates/UI/token browser is currently broken. Another is that menu link related tests are currently completely broken, that all changed faster than we could keep up with it. There's some work from kim but not complete.

berdir’s picture

TokenCacheController is exactly one of those, probably hasn't been touched in at least a year, that is very old code, CSRF protection is built into the router and just needs a flag to be enabled (including adding it to the generated link, neat stuff).

I don't really get to where the code is trying to redirect to (seems like the current route?), the easiest option I think would be $this->redirect('<front>'), that redirects to the frontpage, and an eventually passed along destination should be picked up and win over that automatically.

/D8-defend-mode-off :)

larowlan’s picture

Status: Needs work » Needs review
StatusFileSize
new214.96 KB
new817.93 KB

@berdir sent fixes for the above to the github repo.

Here it is, less the .travis.yml file

Also as a formatted-patch to retain individual commits from there (or commands at #15 if merging is preferred).

berdir’s picture

"Interdiff" for my changes is visible on https://github.com/larowlan/token/pull/59.

There are a few bigger topics that need work I think:

- The whole theme/rendering of the token browser. My suggestion would be to keep the browser modal link as the only theme function, convert the nested table theme functions to a service/function that sets up the render cache and then uses #type/pre_render callbacks for the real work, allowing to rely on the render cache properly (which is currently disabled as those functions it used are gone). I think that would also mean that overrides it used to do for POST are no longer relevant. Also, zero tests :)

- Field tokens, basic output works, but generic references/nesting is missing and there is zero test coverage. Also related is the token view mode, that could probably use an event now for new entity types to create them for entity types that are added alter on.

- Menu (link) tokens are very dead right, as the tests show. With all the refactorings that happened there, I'm not exactly sure how they are supposed to work now, there are multiple different types of menu links, which are then exposed as a common thing through plugins and derivates. So we probably need to run tokens on that, but I'm not sure what the use cases there actually are.

- Various helper functions and info functions, especially token_get_info() should converted to a service, either by replacing the core Token service, or adding a new service that wraps the one from core, or a mix of both. That would allow to write clean tests for a lot of complex code there, and remove the need for all those drupal_static()'s, which makes the code very ugly right now.

- token cache clearing is broken right now, but that's actually a core bug, resetInfo() calls Cache::invalidateTags() incorrectly. Which proves that none of the calls that are supposed to call it actually happen, e.g. because the field hooks are misnamed.

I might find time to work on some of those things, but I'd love to get some feedback/thoughts from Dave on those first.

berdir’s picture

See #2420025: Token::resetInfo() uses invalid cache tag structure for the mentioned core cache clear issue.

The last submitted patch, 50: token.d8.patch, failed testing.

dave reid’s picture

The whole theme/rendering of the token browser.

I think this sounds like a good plan, but maybe it would be good to merge first and then take this on. It looks like POST requests are still being ignored in Drupal 8: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21... - #2367555: Deprecate EnforcedResponseException support

Field tokens, basic output works, but generic references/nesting is missing and there is zero test coverage.

This sounds exactly like the D7 current branch, so I'm not sure why this is something to address (aside from zero test coverage - in the D8 code I assume?)

berdir’s picture

Waiting until it is merged was the plan, yes. POST requests are still ignored, but that is largely irrelevant when we (almost) only render the token tree in a separate ajax (GET) request?

dave reid’s picture

Oh yes, that would be true. Yeah, the POST ignoring only really matter when it was rendering in the page and not in the modal. I still think it would be nice if the token tree still had it's own independent theme function, because it's used at admin/help/token to show all available tokens on the site. If that's still possible with the tree output being in a service/function instead of theme function, then that's ok.

damienmckenna’s picture

FYI both the Metatag and FileField_Paths modules depend upon this; at work we're working on porting both of those modules, so I'm hoping we'll be able to throw some time into this too.

berdir’s picture

Opened a new pull request to fix some comment tests: https://github.com/larowlan/token/pull/61

If this happens to be merged to d.o before someone merges that and provides an updated patch, it is easy enough to just get the changes as a patch: https://github.com/larowlan/token/pull/61.patch

This sounds exactly like the D7 current branch, so I'm not sure why this is something to address (aside from zero test coverage - in the D8 code I assume?)

I don't know the exact state of the 7.x port, that is possible yes, I never remember if I end up using rules field tokens or those from token.module ;) Test coverage definitely, references also possible now that I think about it, otherwise there would be some code for that somewhere. We did a bunch of specific references in custom code now, simply by setting the type of a field token to e.g. node, and 3 lines to pass the sub-tokens through. Should be relatively easy to make that generic, although we should probably do it as a sub-token then, similar to how entity field api/typed does that now, only downside is that it exposes 'entity' to the UI. It would look like this then:
- [node:some_file_field] => field view
- [node:some_file_field:target_id] => 5
- [node:some_file_field:entity:fid] => 5
- [node:some_file_field:description] => the file description.

i guess the way to do this would be to have token types for each field type, should be possible to get all that out of the property definitions.

But as mentioned above, I have no plans to work on this before it is merged, and not before there are tests for the existing field token functionality.

dave reid’s picture

Yeah, the tricky part has always been that works great for single-value fields, but not for multiple-value fields.

berdir’s picture

Here's an updated patch that contains the changes from https://github.com/larowlan/token/pull/61 and https://github.com/larowlan/token/pull/62.

This was green after PR 62, for the first time ever :)

Providing two patches, one against 8.x-1.x, another against 7.x-1.x, that possibly makes more sense to review, due to commits in 7.x-1.x, e.g the different README.txt.

No formatted-patch, I suggest to simply merge from the repository if you want to keep the commits.

Status: Needs review » Needs work

The last submitted patch, 60: token.d8-1962358-60.patch, failed testing.

berdir’s picture

So, all failing tests are, once again, subfolder things, a lot of tokens are /checkout/some/path. In some cases, the test expectations seem to be wrong (absolute url definitely needs to have it), in others, probably not, like path/alias/arg(n). I'm not sure if we should actually continue to support tokens like that, given that core tries to remove the internal path thingy from the API wherever possible.

berdir’s picture

Created a pull request to fix that, should be green on d.o together with that: https://github.com/larowlan/token/pull/63

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new218.25 KB

Here's a patch for that. Interdiff is visible in the pull request.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

There are some whitespaces issues but I think that can be fixed on commit.

penyaskito’s picture

If instead of the megapatch you want to keep history:

git clone --branch 8.x-1.x http://git.drupal.org/project/token.git
cd token/
git remote add larowlan git@github.com:larowlan/token.git
git rebase larowlan/8.x-1.x
git pull --rebase larowlan 8.x-1.x
dave reid’s picture

Status: Reviewed & tested by the community » Needs work

Merged and pushed the current 8.x-1.x using proper history. I'm going to leave this issue now at needs work for now to review the regressions from D7.

  • larowlan committed 021bfb6 on 8.x-1.x
    Issue #1962358 by grom358: Added missing import of Field
    
  • 08b13fa committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenBlockTestCase
    
  • 0cffaff committed on 8.x-1.x
    Issue #1962358 by grom358: Field type and formatter types are not...
  • 0f3392b committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenCommentTestCase
    
  • penyaskito committed 107af82 on 8.x-1.x
    Revert "Issue #1962358 by penyaskito: field_ui_field_edit_form become...
  • 1200452 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenFileTestCase
    
  • penyaskito committed 125773b on 8.x-1.x
    Issue #1962358 by penyaskito: routing params must have the same name...
  • 130a751 committed on 8.x-1.x
    Issue #1962358 by grom358: Added missing use of Element
    
  • larowlan committed 15a3e5c on 8.x-1.x
    Issue #1962358 by larowlan: Fixes use of generate() in test base
    
  • 17656ce committed on 8.x-1.x
    Issue #1962358 by grom358: Removed leading / from path
    
  • 1853608 committed on 8.x-1.x
    Issue #1962358 by grom358: Added missing import of Field
    
  • penyaskito committed 1a921c4 on 8.x-1.x
    Issue #1962358 by penyaskito: Sorting functions have moved to SortArray...
  • larowlan committed 1afbbfc on 8.x-1.x
    Issue #1962358 by larowlan: setup block module for block test
    
  • larowlan committed 1bb8cda on 8.x-1.x
    Issue #1962358 by larowlan: ip_address() removed
    
  • 1c05236 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenDateTestCase
    
  • larowlan committed 1df37f2 on 8.x-1.x
    Issue #1962358 by larowlan: token_test info file to yml
    
  • 1fe9a2e committed on 8.x-1.x
    Issue #1962358 by grom358: Replaced deprecated function calls
    
  • penyaskito committed 204d22f on 8.x-1.x
    Issue #1962358 by penyaskito: Remove hook_library and use token....
  • larowlan committed 24540e6 on 8.x-1.x
    Issue #1962358 by larowlan: Cache service
    
  • 24a7e7a committed on 8.x-1.x
    Issue #1962358 by grom358: Added missing use for String
    
  • larowlan committed 30acad8 on 8.x-1.x
    Issue #1962358 by larowlan: Fixes use of generate() in test base
    
  • larowlan committed 3513190 on 8.x-1.x
    Issue #1962358 by larowlan: Use new entity API elements
    
  • penyaskito committed 37420c2 on 8.x-1.x
    Issue #1962358 by penyaskito: Added @group token to tests.
    
  • penyaskito committed 3872a27 on 8.x-1.x
    Issue #1962358 by penyaskito: Removed pending cache() usage. See https...
  • larowlan committed 3ae37f1 on 8.x-1.x
    Issue #1962358 by grom358: Replaced use of  with Request object
    
  • penyaskito committed 3b16018 on 8.x-1.x
    Issue #1962358 by penyaskito: One method per entity.
    
  • penyaskito committed 3de4cc2 on 8.x-1.x
    Issue #1962358 by penyaskito: Convert devel token integrations to a...
  • larowlan committed 3e70dc7 on 8.x-1.x
    Issue #1962358 by grom358: Fixed typo of __FUNCTION__ constant
    
  • 4056d75 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed errors preventing help page from...
  • 427005e committed on 8.x-1.x
    Issue #1962358 by grom358: Replaced calls to variable_get and...
  • larowlan committed 44ea902 on 8.x-1.x
    Issue #1962358 by larowlan: drupal_random_bytes() removed
    
  • larowlan committed 4564711 on 8.x-1.x
    Issue #1962358 by larowlan: profile removed from core
    
  • larowlan committed 479231e on 8.x-1.x
    Issue #1962358 by larowlan: ip_address() removed
    
  • larowlan committed 48d821b on 8.x-1.x
    Issue #1962358 by grom358: Replaced use of  with Request object
    
  • larowlan committed 4a765de on 8.x-1.x
    Issue #1962358 by larowlan: Use t() instead of get_t()
    
  • penyaskito committed 4b073dc on 8.x-1.x
    Issue #1962358 by penyaskito: Entity::urlInfo() returns a Drupal\Core\...
  • larowlan committed 4f67a26 on 8.x-1.x
    Issue #1962358 by grom358: Added missing use for String
    
  • larowlan committed 5066382 on 8.x-1.x
    Issue #1962358 by grom358: Fixed typo with call to moduleExists and...
  • 526d210 committed on 8.x-1.x
    Issue #1962358 by grom358: Replaced use of  with Request object
    
  • larowlan committed 5642702 on 8.x-1.x
    Issue #1962358 by larowlan: User picture is a field
    
  • larowlan committed 566d790 on 8.x-1.x
    Issue #1962358 by grom358: Field type and formatter types are not...
  • 567c840 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed typo with call to moduleExists and...
  • larowlan committed 638fe58 on 8.x-1.x
    Issue #1962358 by larowlan: profile removed from core
    
  • larowlan committed 6420cbe on 8.x-1.x
    Issue #1962358 by larowlan: Clean up TestBase
    
  • larowlan committed 64a80fb on 8.x-1.x
    Issue #1962358 by larowlan: Info file to yaml
    
  • larowlan committed 67b08c2 on 8.x-1.x
    Issue #1962358 by larowlan: Create token view modes on install
    
  • penyaskito committed 718405d on 8.x-1.x
    Issue #1962358 by penyaskito: Fixed syntax error.
    
  • 731404c committed on 8.x-1.x
    Issue #1962358 by grom358: Replaced call to undefined function...
  • penyaskito committed 7830e29 on 8.x-1.x
    Issue #1962358 by penyaskito: Crypt::randomStringHashed() was removed....
  • larowlan committed 7833fd4 on 8.x-1.x
    Issue #1962358 by grom358: Replaced calls to token_info etc to the Token...
  • larowlan committed 7a3e8d7 on 8.x-1.x
    Issue #1962358 by larowlan: Clean up TestBase
    
  • penyaskito committed 7e06910 on 8.x-1.x
    Issue #1962358 by penyaskito: Replace #attached library array values...
  • penyaskito committed 7f27706 on 8.x-1.x
    Issue #1962358 by penyaskito: Added token.js to libraries and #attach it...
  • penyaskito committed 7fe7660 on 8.x-1.x
    Issue #1962358 by penyaskito: Changed theme() calls to _theme(), for...
  • larowlan committed 8287c40 on 8.x-1.x
    Issue #1962358 by grom358: Fixed errors preventing help page from...
  • larowlan committed 8519288 on 8.x-1.x
    Issue #1962358 by larowlan: drupal_get_path_alias() removed
    
  • larowlan committed 8684a4f on 8.x-1.x
    Issue #1962358 by larowlan: Create token view modes on install
    
  • larowlan committed 86aebed on 8.x-1.x
    Issue #1962358 by larowlan: User picture is a field
    
  • 86b2a5f committed on 8.x-1.x
    Issue #1962358 by grom358: Replaced use of  with Request object
    
  • 8990130 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenURLTestCase
    
  • penyaskito committed 8a485d4 on 8.x-1.x
    Issue #1962358 by penyaskito: Removed drupal_map_assoc() usage. See...
  • penyaskito committed 8c3032e on 8.x-1.x
    Issue #1962358 by penyaskito: Added token.local_tasks.yml. See https://...
  • larowlan committed 9143610 on 8.x-1.x
    Issue #1962358 by grom358: Replaced calls to variable_get and...
  • 935edfd committed on 8.x-1.x
    Issue #1962358 by grom358: Made tests able to run
    
  • penyaskito committed 9626754 on 8.x-1.x
    Issue #1962358 by penyaskito: Menu links have been converted to entities...
  • larowlan committed 96e590e on 8.x-1.x
    Issue #1962358 by larowlan: taxonomy_get_parents_all() replaced
    
  • 974cdd0 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenNodeTestCase
    
  • 9dc2cdf committed on 8.x-1.x
    Issue #1962358 by grom358: Replaced calls to token_info etc to the Token...
  • penyaskito committed 9f996c7 on 8.x-1.x
    Issue #1962358 by penyaskito: token_info() was changed to a service. See...
  • penyaskito committed a3eecc3 on 8.x-1.x
    Issue #1962358 by penyaskito: Fixed css path.
    
  • penyaskito committed a9ec786 on 8.x-1.x
    Issue #1962358 by penyaskito: hook_node_prepare_form has 3 args now.
    
  • larowlan committed a9fbaf0 on 8.x-1.x
    Issue #1962358 by grom358: Replaced call to undefined function...
  • abdc341 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenUserTestCase
    
  • larowlan committed abe0f7c on 8.x-1.x
    Issue #1962358 by larowlan: setup block module for block test
    
  • larowlan committed ae54a3a on 8.x-1.x
    Issue #1962358 by larowlan: Add type 'module' to info files
    
  • af43fc5 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed typo of __FUNCTION__ constant
    
  • afe40ba committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenEntityTestCase
    
  • larowlan committed b51e7b9 on 8.x-1.x
    Issue #1962358 by larowlan: Tests to psr-0
    
  • penyaskito committed b5e35ce on 8.x-1.x
    Issue #1962358 by penyaskito: Removed cache() usage. See https://drupal....
  • b7d92fb committed on 8.x-1.x
    Issue #1962358 by grom358: Replaced call to variable_get
    
  • larowlan committed c13a73d on 8.x-1.x
    Issue #1962358 by grom358: Replaced use of entity_label and entity_uri
    
  • penyaskito committed c1c8477 on 8.x-1.x
    Issue #1962358 by penyaskito: Convert token/flush-cache to a controller.
    
  • larowlan committed c3ac5fa on 8.x-1.x
    Issue #1962358 by grom358: Added missing use imports
    
  • larowlan committed c5c9af5 on 8.x-1.x
    Issue #1962358 by grom358: Added missing use of Element
    
  • larowlan committed cd94727 on 8.x-1.x
    Issue #1962358 by larowlan: taxonomy_get_parents_all() replaced
    
  • d2ce7d9 committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenUnitTestCase
    
  • larowlan committed d911192 on 8.x-1.x
    Issue #1962358 by larowlan: entity info is an object
    
  • penyaskito committed da13188 on 8.x-1.x
    Issue #1962358 by penyaskito: Changed hook_entity_info_alter to...
  • larowlan committed db04a01 on 8.x-1.x
    Issue #1962358 by larowlan: drupal_random_bytes() removed
    
  • larowlan committed dbe5944 on 8.x-1.x
    Issue #1962358 by larowlan: More test fixes
    
  • larowlan committed e140260 on 8.x-1.x
    Issue #1962358 by larowlan: Remove 7x update hooks
    
  • larowlan committed e5f5bd7 on 8.x-1.x
    Issue #1962358 by larowlan: entity info is an object
    
  • penyaskito committed e6127b5 on 8.x-1.x
    Issue #1962358 by penyaskito: Test requires to create the page content...
  • e62744f committed on 8.x-1.x
    Issue #1962358 by grom358: Replaced use of entity_label and entity_uri
    
  • larowlan committed ec2893e on 8.x-1.x
    Issue #1962358 by larowlan: Fixes final test fails
    
  • ec74786 committed on 8.x-1.x
    Issue #1962358 by grom358: More test fixes
    
  • penyaskito committed eefee11 on 8.x-1.x
    Issue #1962358 by penyaskito: Convert token/autocomplete to a controller...
  • larowlan committed f1d97e4 on 8.x-1.x
    Issue #1962358 by grom358: Replaced deprecated function calls
    
  • penyaskito committed f3dbd89 on 8.x-1.x
    Issue #1962358 by penyaskito: field_ui_field_edit_form become...
  • penyaskito committed f5ff5f0 on 8.x-1.x
    Issue #1962358 by penyaskito: Renamed Drupal::getStorageController() to...
  • penyaskito committed f617294 on 8.x-1.x
    Issue #1962358 by penyaskito: Added type hinting to token_tokens...
  • penyaskito committed f84399a on 8.x-1.x
    Issue #1962358 by penyaskito: field_ui_field_edit_form become...
  • larowlan committed f8ddd79 on 8.x-1.x
    Issue #1962358 by larowlan: drupal_get_path_alias() removed
    
  • f9fc6dc committed on 8.x-1.x
    Issue #1962358 by grom358: Removed unneeded parentheses
    
  • fa4a22f committed on 8.x-1.x
    Issue #1962358 by grom358: Added missing use imports
    
  • larowlan committed fab2eb1 on 8.x-1.x
    Issue #1962358 by larowlan: Use new entity API elements
    
  • fd25e6b committed on 8.x-1.x
    Issue #1962358 by grom358: Fixed TokenNodeTestCase
    
dave reid’s picture

We should get separate tickets filed for the current regressions, then we could close this out.

berdir’s picture

dave reid’s picture

Status: Needs work » Fixed

Cool, let's close this in favor of all the open issues then!

The last submitted patch, 1: token-1962358.patch, failed testing.

The last submitted patch, 1: token-1962358.patch, failed testing.

The last submitted patch, 50: token.d8.formatted.patch, failed testing.

Status: Fixed » Closed (fixed)

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