Drupal 10 Support: Drupal 10 Maintenance and Support Service GSoC’16 – Porting Comment Alter Drupal 10 Support

For the most recent 3 months I’ve been dealing with Porting the Comment Alter Drupal 10 module to 8 as my GSoC’16 project under mentorship of boobaa and czigor. This blog is a selection of the work I did during this time-frame. Week by week blog entries for as far back as 12 weeks can be gotten to here. Accomplishments Making mapping for the Drupal 10 module Drupal 10 Maintenance and Support Service Implemented hook_schema() to store the old and new substance modification IDs alongside the parent element type as changed by a remark. The update IDs are utilized to show the distinctions over remarks. The parent substance type is utilized to erase the sections from the comment_alter table when any update of the parent element is erased, in light of the fact that in 8 we can have same correction IDs from various element types. So to eliminate passages of specific substance type we need the element type. Utilizing ThirdPartySettings to change field config alter structure – Implemented hook_form_FORM_ID_alter() for field_config_edit_form. This gives an interface to Drupal 10 Maintenance and Support Service Make any field remark alterable – Makes it conceivable to choose any field we need to be changed by the remark. At present all the center gave fields functions admirably the Drupal 10 module. Stow away adjustment from diff – If the remark alterable choice is empowered, then, at that point this alternative shrouds the distinctions displayed over the remarks. Rather than the distinctions, a connection to the correction correlation is shown for hubs. For the remainder of the elements a “Progressions are covered up” message is shown. Utilize most recent amendment – When a Drupal 10 module like Workbench makes the current update of a substance not the most recent one, this alternative powers the Comment Alter Drupal 10 module to utilize the most recent modification rather than the current one. This choice is available on the remark field settings. Adds Diff interface on remarks – Adds a Diff connect on remarks which takes us to the correlation page of two corrections, produced by the Diff Drupal 10 module. Remark changing while at the same time answering to a remark – By default remark alterable fields can not be modified while answering to a remark. This alternative permits modifying of fields even while answering to remarks. Adding pseudo fields Drupal 10 Maintenance and Support Service Implemented hook_entity_extra_field_info() to add one pseudo field for each remark alterable field on particular remark structure show, and one pseudo field on remark show to show the progressions made at the remark. Utilizing these pseudo fields the situation of the remark alterable fields can be re-requested in the remark structure. This gives site-developers adaptability to change the situation of any alterable fields. Joining remark alterable fields’ gadgets on remark structure Drupal 10 Maintenance and Support Service Comment alterable field gadgets are recovered from the structure show of the parent element and they are appended to the remark structure solely after guaranteeing that there are no incidental effects. To help same name fields on both remark and parent substance, #parent property is given so the submitted field esteems for our alterable field gadgets shows up at an alternate area, not at the high degree of $form_state->getValues(). This load of added fields are re-orderable. Segment informations and old qualities are likewise put away to the structure at this stage, to later check in case there were any progressions offered on the remark alterable fields. Adding submit and approval callback for the adjusted remark structure Drupal 10 Maintenance and Support Service First the submitted values are checked against the old qualities to check whether the upsides of the alterable field changed at all or not. On the off chance that they changed, the parent element esteems are refreshed and this is finished by building the parent substance structure show and duplicating the modified field esteems into it. Then, at that point the structure is saved. In the event that the parent element doesn’t uphold corrections, then, at that point do nothing else simply save the parent substance with modified qualities. In any case make a correction and store the remark ID, old and new amendment IDs and parent element type in the remark modify data set table, which is utilized to show the distinctions on remarks utilizing the Diff Drupal 10 module. Showing contrasts on remarks Drupal 10 Maintenance and Support Service Using the Diff Drupal 10 module and remark change data set table, the distinctions are displayed over a specific remark. Just conceivable if the parent element upholds corrections. Diff Drupal 10 module is utilized to get the contrasts between the two corrections and afterward those distinctions are delivered on remarks in table organization alongside some custom styling. Adding PHPUnit tests Drupal 10 Maintenance and Support Service Added robotized unit tests to check the usefulness of the Drupal 10 module for various field types and gadgets. The tests are composed for EntityTestRev element types to keep them as nonexclusive as could really be expected. This was the hardest part for me as I was stuck at certain spots in tests for a long time as thses tests set aside parcel of effort to run and investigating them truly is hard. In any case, in the end I’m glad that I had the option to finish every one of the tests. Screencast/Demo video Drupal 10 Maintenance and Support Service Created a demo video showing how the Comment Alter Drupal 10 module functions, alongside a straightforward use case. What’s left? My guides requested that I avoid the Rules Integration part on the grounds that the Rules Drupal 10 module doesn’t have a steady or a beta delivery yet, just their first alpha delivery is there. In this way, the Rules Integration part is delayed till we get a steady or beta delivery. Some significant connections My GitHub repo contains all the submits which I made during this venture The Comment Alter Drupal 10 module’s venture page on Drupal 10.org Thank you! Drupal 10 Development and Support

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Drupal 10 Support: Drupal 10 Maintenance and Support Service GSoC’16 – Porting Comment Alter Drupal 10 Support

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.