Closed (fixed)
Project:
Automatic Entity Label
Version:
7.x-1.2
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 May 2014 at 20:59 UTC
Updated:
1 May 2020 at 08:47 UTC
Jump to comment: Most recent
Comments
Comment #1
bforchhammer commentedYes, I have already started working on it... :)
I can't say how soon it will be done, but as soon as I have something functioning I will push it to a sandbox (or the D8 branch). I'll post a note here when that happens.
Comment #2
joaomachado commented@bforchhammer Awesome, I will be ready to test when ready ;-)
Comment #3
bforchhammer commentedI've uploaded an initial version to this sandbox: https://drupal.org/sandbox/bforchhammer/2278229
Token-based patterns work already, however there is no token browser yet so you need to figure them out yourself; (waiting for #1962358: Token Drupal 8 port, or possibly #514990: Add a UI for browsing tokens). I am also planning to eventually add a PHP or custom-callback based method again, but that's not done yet.
To get started, navigate to
admin/structure/entity-labels; that page will give you an overview of all entity labels and "automatic label value" configurations.There's still quite a few things left to do; if anyone wants to help out, feel free to reach out/use the sandbox issue queue. :)
Comment #4
matsbla commented@bforchhammer:
Really great that you already started to work on D8 module! I will definitely use this module when porting the website I work on to D8!
Are there any challenges when it comes to multilingual issues in D8 ? E.g. will it be possible to translate different title syntax?
(Here are 2 issues about this module and i18n)
#1894078: Make the automatic title translateble
#2119703: Node title is not translated on node visualization using entity translation
Will the D8 version take into consideration language fallback that are now a part of unified multilingual system for core?
#2122175: String translation does not honor language fallback
Also, how do you see the possibilities to advance this module in D8 to make it possible to give automatic patterns for any textual field as described her:
#2022785: Advance this module to an "Automatic field" module, to give automatic pattern/choices for any field
Would appreciate to get the overview of issues you know about concerning this module, D8, i18n and textual fields.
Comment #5
bforchhammer commentedCompared to D7, the translation of entities overall has far better support in D8, therefore a lot of the D7 pain points should not be an issue anymore; the code in the sandbox already works fine with producing titles depending on the respective language of an entity/translation.
I don't think there's anything to do in respect to the functionality of translation fallbacks; I haven't tested it yet, but I think that should just work out of the box.
Patterns are stored in configuration and, therefore, should be translated using the new configuration translation user interface; I have already added support for those, so that should also work. (Of course core is changing fairly rapidly at the moment, so things might have broken and need more work).
That's definitely still a possibility, however I haven't put any work into it yet. From an implementation perspective there are still quite a few differences between entity "properties" (=e.g., labels) and "fields"; as far a I know the field system in D8 does support computed values already (in contrast to properties!), so it should be relatively straight-forward to implement computed fields (or "automated field values"). I think, the functionality around defining patterns/callbacks is definitely something that could be reused between entity labels and other fields...
Comment #6
matsbla commentedThanks for this great answer! It clears up a lot for me :)
What are the differences? Why are not the labels (e.g. title properties?) simply a type of field?
Comment #7
rru commentedI tested the code from the sandbox on Drupal 8 beta 4 today (MAMP 3.0.7.2, PHP 5.6.2), and got the following php error on installation:
PHP Fatal error: Declaration of Drupal\entity_labels\Form\AutomaticValueConfigForm::buildForm() must be compatible with Drupal\Core\Form\FormInterface::buildForm(array $form, Drupal\Core\Form\FormStateInterface $form_state) in ...modules/entity_labels/src/Form/AutomaticValueConfigForm.php on line 196
Comment #8
ericduran commented@bforchhammer do you might commiting that project as an 8.x branch? or are you trying to make it a new project name?
auto_entitylabel is a pretty good name. Creating a branch for 8.x would make it easier to clean it up and submit patches to get a proper release up.
I only ask because I have time & resources available to work on this.
Comment #9
nicholas.alipaz commentedWorking D8 and would be really nice to see a module for this. The current D8 sandbox errors on install and this thread was started two years ago so I am guessing development might be abandoned.
Comment #10
spacereactor commentedSo far I only find Automatic Nodetitles got a working drupal 8 for node title but you need to use the repo. The current Automatic Nodetitles Modules still got some bug that is misiing token broswer but still work with token. see the link there. Let hope someone pick up the Automatic Entity Label for Drupal 8
Comment #11
Jaesin commentedI am working on fixing the plugin part of the entity_labels module here: https://github.com/jaesin/autovalue as more of an API module. I see auto_entitylabel as just one use case for the auto label plugin.
Comment #12
spacereactor commented@Jaesin looking forward to alternative module for drupal 8
Comment #13
geek-merlin@Jaesin: Great idea. Crosslinking #2022785: Advance this module to an "Automatic field" module, to give automatic pattern/choices for any field
Comment #14
dqdThanks for all the work and thoughts on this. I would like to clean up the issue queue. The last comment is 3 years old and many users report that the project works fine (including me and our projects with it running since 2 years) and RC is around the corner. ATM - I work on fixing the last nitpicking issues to tag it and most others issues are fixed. So I close this one here.
Please chime in on #3037753: Configuration not removed when content type (node bundle) is deleted (need tests and opinions on it) before I can tag an RC and set D8 port tracker issue to RTBC. Otherwise please read my comment on the project page regarding the upcoming D9 discussion and the future of the project when core label fields become accessable like other field types.
#13: As I have stated elsewhere already, there are feature overlaps between Auto Entity Label, Computed field and Field Token Value or even Entity Extra Field (depends on the use case). But before D9 core label field initiative Auto Entity Label was the only project able to access and hide the default core label field out of the box, which is required when content types are used in a rather ECK type of manner (no visible title needed). And in the moment when the core it's entity label field initiative makes core label fields more accessable in the near future, then Auto Entity Label, Field Token Value, Entity Extra Field and Computed field are very overlapping and can be merged, if all maintainers agree (I certainly would since I am not a huge fan of this overlapping module clutter, but it's not up to me allone).