Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
# Summary
This module provides an auto-increment (serial) field.
# Project URL
https://www.drupal.org/project/serial
# Where is the code?
https://www.drupal.org/project/serial/git-instructions
# Estimated completion date
First dev release on September 2016
# Dependencies
Unknown
# Who's doing the port?
colorfield
# What help do they need?
Unknown
# D8 roadmap
A MVP has been ported, but there are still opened issues.
# Background and reference information
Unknown
Comment | File | Size | Author |
---|
Comments
Comment #2
alarez CreditAttribution: alarez at ParallelDevs commentedHello.
If you need help with porting this module our company developers would be happy to help.
thanks.
Comment #3
colorfieldHowdy
Thanks, help is greatly appreciated. Just back from a few weeks off, I will continue the work + keep you posted about the progress.
Comment #4
alarez CreditAttribution: alarez at ParallelDevs commentedSounds Good. Thank you for replying.
Comment #5
matsbla CreditAttribution: matsbla commentedAny progress on this?
If not I might try find development for it myself.
Comment #6
matsbla CreditAttribution: matsbla commentedPlease check pull requests:
https://github.com/r-daneelolivaw/serial/pulls
Comment #7
colorfieldThanks for the feedback. Some coding standards sounds unclear to me, I tend to follow PSR-2 but PHP const are still uppercase in the Drupal CS. Anyway, I propose to use Coder once done.
I took some time documenting on this issue
, without finding a better way, so I will still continue on the current naming convention.Any thoughts on this ?
Comment #8
colorfieldHad some time to go on today and ended up on a first working version
, still non atomic yet.Main issues left
Handle atomicityThey should be closed before the end of September, right in time ; )
Comment #9
colan@colorfield: Thanks for all of your work on this! Is #2455677: Getting Duplicate numbers and gaps in the sequence order included, or do we need to forward port it?
Comment #10
matsbla CreditAttribution: matsbla commentedThank you! I made a quick test now together with pathauto.
Seems like it the paths patterns using the serial field is not working when translating the nodes!
Not sure if that is covered by any of the remaining issues?
Comment #11
colorfield@colan I will take some time to update what I missed from the 7.x issue tracker + let you know.
@matsbla thanks for testing, I can reproduce this and after a quick check I see 3 possibly related issues here, I will look into this
The Manage display form (e.g. admin/structure/types/manage/article/display) throws "Drupal\Component\Plugin\Exception\PluginException: The plugin (integer) did not specify an instance class. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 79 of /var/www/drupal82/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php)." Issue on githubFixedComment #12
matsbla CreditAttribution: matsbla commentedThank you!
I have 2 other comments/feedbacks:
Comment #13
colorfield@matsbla
Comment #14
colorfield@colan the module has been ported with this issue patch #2455677: Getting Duplicate numbers and gaps in the sequence order included (#9) + I just did a manual check from the latest codebase
Comment #15
colan@colorfield: Okay, great. Let's start forward-porting any new commits until you're got a release. I'm not expecting much traffic here (if any) as this module has been having very low activity commit-wise.
Comment #16
colorfield@matsbla the pathauto issue with content translation installed should be fixed now.
It seems that the expected behavior of serial amongst entity translations is the same serial id (see #888850: Sync Serial Field with translated nodes + comment #11 3.) which is currently the case in the module port: the site builder decides that he wants a new serial for each translation via "Users may translate this field" option, but is it clear enough?
Comment #17
colanI think that's sufficient for now. Folks can open other issues later if things aren't clear.
Comment #18
matsbla CreditAttribution: matsbla commentedI tested now, looks great! (y)
I really like the flexible aproach to make the Serial Field translatable to give each translation different Serial number. However, to me it seems a little bit strange that I have to make it translatable in the configuration settings.. Normally when I will make a Field translatable I simply do this within the Field settings, right?
If we can get a D8 branch at the module Project page I can create the issues and we can discuss them further there.
Comment #19
matsbla CreditAttribution: matsbla commentedAre all these issues still valid?
https://github.com/r-daneelolivaw/serial/issues
Comment #20
colorfieldBoth options for defining field translation are available
- field level (e.g. admin/structure/types/manage/article/fields/node.article.field_serial)
- global content language and translation level (admin/config/regional/content-language)
these are the default ones for field translation, so should be ok.
+1 for creating separated issues about non blocking things, one topic at a time.
Some remaining issues are about code polishing, the blockers are still
Implement field create and delete instance operationsCoding standardsI'm on it and will keep you posted.
Comment #21
colorfieldHowdy,
We are not so far from a release, the main remaining issues were fixed,
leaving coding standards, Node clone support and a bit of refactoring.A bit stuck with bundle renaming: is it still available under Drupal 8?
I cannot find traces from hook_field_attach_rename_bundle, hook_entity_bundle_rename anymore and the UI does not seem to expose bundle renaming.
If we look at the Drupal\Core\Entity\Entity class, the setOriginalId method specifies :
I cannot find traces of rename in the subclasses of Entity either and the entity.api.php mentions
Am I missing something or can we consider that we can get rid of bundle renaming?
Comment #22
colanI think we can get rid of it as per #2172843: Remove ability to update entity bundle machine names. That's where that comment was added.
Comment #23
colorfieldOk thanks, I removed that feature from the SerialStorageInterface.
I can work a bit later this week on the unit test but do not think that the remaining issues are blocking + the coding standards have been applied.
Comment #24
colorfieldComment #25
alvar0hurtad0Still have some coding standards issues, and a problem with the @inheritdoc comment on setup.
I've created a pull request on github:
https://github.com/r-daneelolivaw/serial/pull/23
Comment #26
colorfieldThanks, merged
Comment #27
mennonot CreditAttribution: mennonot at Congruity Works commentedAny update on this? This could be a useful, but not necessarily necessary field for a current Drupal 8 project we are working on.
Comment #28
colanGiven the status here, please test it and/or review the code and report back. Thanks! That will help us move forward with this.
Comment #29
ExTexan CreditAttribution: ExTexan commentedThanks for getting this ported to D8.
Could the D8 version be added to the Serial project page, and an issue queue created? I have a patch I'd like to submit re: an alternative for the MD5 hash in the table names, but I don't think I should post it here in this thread.
Comment #30
ExTexan CreditAttribution: ExTexan commentedI'm developing in a local environment, then committing/pushing changes to a Pantheon Dev sandbox. When I enabled this module and created a serial field on a content type (locally), it seemed to work fine when I exported the config settings and pushed them to Pantheon. But when I tried to create a node of that type, I got an error because the serial_xxxxxxxxxxxx table did not exist.
It seems that table isn't getting created during the config synchronization when the serial field itself gets created.
Comment #31
colan@ExTexan: As you suggested, it would be better to file any side effects as issues against 8.x. I just created a new 8.x branch by pushing master from the GitHub repository. So please file the above as a new issue. Thanks!
If we're done with the GitHub repository, it would be great if someone could recreate those issues here (against 8.x).
Comment #32
colorfieldI will recreate the GitHub issues on DO.
Comment #33
ExTexan CreditAttribution: ExTexan commentedIt's nice that we now have the 8.x version in the issue queue of the project page. Thanks for that.
Are there plans to move the 8.x code from github to the project page as well? It would be nice if we could include this in our "composer update" process instead of it being a manual step.
Comment #34
Isti_d CreditAttribution: Isti_d commented@colorfield: could you please advise when can we get it on the project page?
Comment #35
mmjvb CreditAttribution: mmjvb as a volunteer commentedWith only a development release on d.o. Status should be Needs work. For Needs review an alpha or beta is needed on d.o.
This issue is to report the current Status of the port. The porting itself should be managed in the issue queue of the module itself, either on d.o. or GitHub. The same thing goes for status requests, Ask them in the module queue and update this issue with the answer.
Comment #36
Cyberflyer CreditAttribution: Cyberflyer as a volunteer commentedIs anyone actively working on this module?
It's crucial to a side design I am just about to implement.
Comment #37
colorfieldUpdated the issue summary for clarity (replaced the GitHub references by the Drupal.org ones), as described by @mmjvb we should now review remaining issues and decide with the module maintainers when a first alpha release is available then identify what are beta blockers.
I have no time to work on this project before February 2018, but will definitely be happy to help on remaining issues then.
Comment #38
Cyberflyer CreditAttribution: Cyberflyer as a volunteer commented@colorfield: I'm not able to code effectively at this level, but I can drive Mac GDB and have my PHP compiled with x-debug.
If folks are willing to get this thing going, I am willing to debug and provide feedback.
Comment #39
colorfield@Cyberflyer all good, imo the first issue that we should work on is #2833506: Prevent regression of closed issues, so other contributors can run automated tests while producing patches. I can start with that in February.
Comment #40
Cyberflyer CreditAttribution: Cyberflyer as a volunteer commented@colorfield Well, it's Feb, the Eagles won the superb owl and I'm undeway. I want to launch my product with Drupal 8 if possible. One bug in PHP 7.2 is slated to be fixed in March. Followed your link to the Unit Testing set up. Makes sense.
If I can make a sensible pass at that, I will,
Thanks.
L.
Comment #41
colorfieldAdded a patch for #2868303: Type not found for custom Entity and created a first port of the unit tests to PHPUnit #2833506: Prevent regression of closed issues.
I propose to continue with #2862447: Serial field not populated when node created programmatically + if we consider this feature as a mvp #2847954: Allow having starting value for the serial field and set existing entities initialization as optional, we need to take this into account #2945658: Add an option to bypass default serial initialization for existing entities.
+ probably a few updates from the 7.x branch that should be forward ported, any feedback?
Comment #42
dbt102 CreditAttribution: dbt102 at Pineshore for Smoky Mountain Institute commented+1
Comment #43
colorfieldCross-posting #3020133: Offering to maintain Serial Field 8.x
Comment #44
colanJust moved that one to the project ownership queue so hopefully we'll get this rolling soon.
Comment #45
colan@colorfield: I got full access today so made you a maintainer. Thanks for helping with the Drupal 8 version!
Comment #46
colorfieldThank you @colan! I will start the work on the RTBC's this week
Comment #47
colorfieldMerged / closed a bunch of issues these last 2 weeks, thanks a lot to all the persons that helped on these ones :)
Did some extensive testing today and we are (finally) close to a release.
Opened 2 new issues, 1 of them needs review:
Then the following issues will be updated from the latest codebase during the dev days, next week
Comment #48
colorfieldWe have a first alpha release https://www.drupal.org/project/serial/releases/8.x-1.0-alpha1
Comment #49
mmjvb CreditAttribution: mmjvb as a volunteer commentedDue to alpha.