Below is an example of what AI can write when using the “chat” feature. Some of it was just regurgitating back what I said word for word, but there was some useful insight provided as well. The fact that I can have an intelligent debate now with a machine on and emerging technology topic reserved for tech enthusiasts and developers is exciting. The aha moments discuss, talent availability vs technology stack this is a consideration which is notoriously difficult to measure. It shows a level of intelligence and consideration reserved usually for the most experienced technical project managers and IT decision makers.

Dialogue and debate with ChatGPT on Cross Platform Apps vs PWAs

Alex — What is your take on the future of PWAs and cross-platform apps, will they coexist?

AI — Progressive Web Apps (PWAs) and cross-platform apps (such as those built with React Native or Flutter) are both important technologies for building mobile apps, and they have different strengths and use cases.

PWAs are web apps that are designed to work offline and be installed on the home screen of a user’s device, providing a similar experience to native apps. They are built using web technologies such as HTML, CSS, and JavaScript, and can be accessed through a web browser. PWAs are typically easier to develop and maintain than native apps, and they can be accessed by a wide range of devices, including those running different operating systems.

Cross-platform apps, on the other hand, are built using frameworks and languages such as React Native or Flutter, and they can be compiled to run on multiple platforms, such as iOS and Android. These apps provide a more native-like experience, and they can access device features such as the camera and GPS. They are usually more performant than PWAs but harder to build and maintain.

It’s likely that both PWAs and cross-platform apps will continue to coexist in the future. PWAs will be used for simpler apps that don’t require access to native device features and can be built quickly, while cross-platform apps will be used for more complex apps that need a more native-like experience and access to device features.

Some companies may choose to use a combination of both PWAs and cross-platform apps, depending on their specific needs and

Alex — I disagree PWAs can build just as complex apps as any native app, and your example is flawed, web browsers like Chrome and Safari have device access like GPS and camera

AI — You are correct, my previous statement was not entirely accurate. PWAs have evolved significantly in recent years and now have access to a wide range of device features such as camera, GPS, and push notifications. This means that PWAs can be used to build complex apps that have a similar functionality to native apps.

PWAs have come a long way from the early days of web apps, with the introduction of new APIs and technologies such as service workers, which allow for offline functionality, and the Web App Manifest, which allows for installation on the home screen of a user’s device.

In summary, PWAs can build complex apps and have access to device features like gps, camera and push notifications, but it’s still true that building cross-platform apps using React Native or Flutter can offer more native-like experience and might be more performant, however the development and maintainability might be more complex.

It’s ultimately a trade-off between the development and maintenance cost and the level of native-like experience you want to achieve. Both PWAs and cross-platform apps have their own strengths, and the choice will depend on the specific requirements of each project.

Alex — you are right that cross platform apps like Flutter and React Native have better access to native device APIs as these aren’t all yet available in the browser, particularly Safari, but I disagree they are more performant, for a few reasons

1. With web technologies you have access to a large developer pool making it easier to find talent to work on your app in addition these developers are often very experienced as they have been working with the web for a very long time, though many PWAs techniques are new they do not take long to understand for an experienced dev, in addition many new developers are getting into web development every day.

2. Working with established web development technologies can allow for smoother development not only because of the developer experience but because they are stable, robust with very large communities.

Because of these two points there will be less time on learning a new technology that may not be as mature and more time spent making your app faster and more performant with modern web technologies such as single page applications, Hotwire Turbo and web sockets, service workers and Google Lighthouse optimization.

AI — You are correct, that cross-platform frameworks such as React Native and Flutter do have more access to native device APIs, but it’s not always the case that they are more performant.

You also highlighted several good points about the benefits of using web technologies for building PWAs. Having access to a large developer pool and experienced developers who are familiar with web technologies can make development faster and smoother. The stability, robustness and large communities of web technologies can also lead to better performance and optimization of the app using modern web technologies such as single page applications, Hotwire Turbo, web sockets, service workers and Google Lighthouse Optimization.

Additionally, as web technologies continue to evolve and improve, the gap between the performance of PWAs and cross-platform apps is likely to narrow further. This is why many companies are now using a combination of both PWAs and cross-platform apps, depending on their specific needs and requirements.

In summary, both PWAs and cross-platform apps have their own strengths and use cases, and the choice will depend on the specific requirements of each project. While cross-platform apps have more access to native device APIs, PWAs can offer similar functionality and can be built more quickly and easily by experienced web developers and with modern web technologies.

Below are some photos of my talks at Drupalcon, you can read more about PWAs on

Alexander Borsody

Rohit Kumar

Rengenathan Sudararajan

Stephanie Vellucci


From Infancy to Green Initiatives


Cryptocurrency has changed the world – but can it also be used to save it? Over the last four decades, cryptocurrency has evolved from a futuristic ideal, to a coveted and highly sought-after asset. In order to understand the potential of cryptocurrency, one must first understand how and why it exists. Initially cryptocurrency was intended to work solely as its name suggests: as a form of digital currency. This emerging technology had several benefits, but also had a detrimental environmental impact. The focus of this paper is two-fold: it explores the history of cryptocurrency as a unit of value, and it will elaborate on how the progression of cryptocurrency has led to the creation of a global carbon market that can help preserve future generations.

What is Cryptocurrency?

The term “cryptocurrency” is a combination of “cryptography” and “currency.” Cryptography is the study of secure communications techniques that is intended for only the sender and intended recipient of a message to view its contents (Rivest, 1990). Currency is a system of money that can be used in a transactional exchange. It is most widely distributed and regulated by a country or other governing body. “Cryptocurrency,” therefore, is an electronic currency meant to act as any other physical currency, such as the United States Dollar or Japanese Yen. Just as physical currency acts, it can be exchanged for goods and services. Cryptocurrency is unique to its physical counterparts in that it is intended to be devoid of a central governing authority (Farell, 2015).

Most experts agree that, while the uses may vary, the general requirements for cryptocurrency as an ideal cash system remain the same. There are six criteria for an ideal cash system, as identified by Okamoto and Ohta in 1991. These pillars are as follows:

  • Independence: Cannot depend on any physical condition. Cash should be able to be transferred electronically.
  • Security: Copying and forging cash must be prevented
  • Privacy: User identify protected. People should not be able to figure out two a user is based on the transaction.
  • Off-line Payments: Transaction is not dependent on both parties being on-line
  • Transferability: must be able to transfer to others
  • Divisibility: Cash must be able to be broken down into smaller portions.

(Okamoto & Ohta, 1991)

Most transactions that occur online today are through a credit card transaction or an third-party intermediary entity such as PayPal. Through these transaction, an individual’s banking information (whether in the form of credit or account information) is entered into a website. This is a risk to an individual’s personal security (Narayanan, Bonneau, Felten, Miller, & Goldfeder, 2016).

Creating Cryptocurrency

In 1983, David Chaum first vocalized the idea of applying cryptography to cash. His concept was to create a digital “note” that is unable to be replicated. We are able to utilize the digital note as a form of currency as opposed to a credit transaction. To avoid being able to replicate currency at will, Chaum suggested that the receiver of the new note would have a “blind signature” that authenticates the note. This new system was feasible, but still required a central authority to administer and authenticate the digital currency. Additionally, if the server the digital currency was on failed or was offline, the transaction would not be possible.

Chaum then collaborated with Fiat and Naor to create an offline digital cash system, which would allow spending to occur, and then be reconciled once the retailer is back online. Funds detected as false would then be punishable in a similar degree as a bounced check. A bounced check is legally punishable and is still considered owed to the intended receiver regardless of ability to pay immediately. We have to ask ourselves: how can we hold individuals accountable without revealing identifying information? It’s not an easy task, but it is possible. When an individual spends a unit, the retailer will require a random bit of the coin to be decoded and store that bit of code. If the coin is spent in two or more places, the coin would have multiple sections of the code decrypted throughout any transactions that occurred. Because the coin would be issued by a higher entity, both portions of the decrypted code would provide enough information for the bank to decode an individual’s identity. (Narayanan, Bonneau, Felten, Miller, & Goldfeder, 2016)

Conceptual contributors started popping up all around the world over the next few decades. In 1991, Ohta and Okamoto conceptualized using Merkle trees to allow for smaller payment portions for a unit. In 2005 the concept of “zero-proofs,” proving to one party that the currency is valid, without conveying any personal identifying information, was expanded and the iteration founded in 2005 was a key component in the creation of bitcoin (Farell, 2015) . Nick Szabo in 2015 introduces us to the concept of using computational puzzles to mint currency. This however, required timestamping services to legitimize money, and had potential for anonymity issues (Narayanan, Bonneau, Felten, Miller, & Goldfeder, 2016) Despite the concept of cryptocurrency having initially been conceived in 1983 and continually being built on, it would still take 25 years before the inception of the first successful cryptocurrency. Despite the concept of cryptocurrency having initially been conceived in 1983 and continually being built on, it would still take 25 years before the inception of the first successful cryptocurrency.


Bitcoin is the first successful, sustainable form of cryptocurrency that is decentralized from any governing authority. Bitcoin operates on a peer-to-peer network and is unregulated. Transactions are maintained publicly (while keeping the owners anonymous) and the servers that maintain bitcoin are in various locations. Using Bitcoin also has the added benefit of low transaction fees, low latency time, and meets the needs of individuals wishing to remain anonymous when conducting transactions. Bitcoin’s origin story is intriguing, primarily due to its early success being attributed to the purchase of illegal drugs through online transactions (Leonhard, 2017) as well as the mystery shrouding its pseudonymous founder, Satoshi Nakamoto.

Bitcoin was launched in 2009 by Satoshi Nakamoto. Satoshi Nakamoto is a pseudonym for the developer (or developers) that created bitcoin. Still to this day their identity has not been revealed. Satoshi Nakamoto’s first appearance was with a white paper in 2008, and in 2009 they produced their first client software (Lemieux, 2013). From 2008 to 2010, he was active in the cryptocurrency world. He would frequently communicate with company’s regarding issues they were having, offered code patches, and had a large presence in the industry. By 2010, other individuals were becoming adept at maintaining the Bitcoin system. He slowly started moving out of the day-to-day maintenance of the system and, in 2011, drafted a farewell email. Even further shrouding Nakamoto in mystery is the estimation that he owns well over 1 million BTC (unit of measurement for bitcoin). This amount is estimated to be the equivalent of $60 billion (Baldridge, 2021).

While the concept of a system of currency unburdened by government regulation may seem ideal, it does come with its risks. Those risks were highlighted in the attacks that occurred within the Tokyo-based cryptocurrency exchange platform, Mt. Gox (Magic: The Gathering Online Exchange). Investigators concluded that, as a result of theft occurring, hundreds of thousands of bitcoin went missing (Ishikawa, 2017). The exchange collapsed in 2014, but there were still lawsuits pending as recently as 2020. In a system such as this, how are perpetrators help accountable for their actions? They generally aren’t held accountable by any country or entity, because in most cases they are not a stakeholder for the currency. Many countries have developed loose policies pertaining to the use of cryptocurrency, but the nature of cryptocurrency only allows for very loose regulations. Bitcoin’s focus on decentralization and anonymity is evident in the structure of each individual bitcoin.

To further illustrate how Bitcoin meets the conditions of an ideal cash system, we can compare it to the pillars identified by Okamoto and Ohta:

    • Independence: Able to be transferred electronically.
    • Security: By utilizing a peer-to-peer network, bitcoin is autonomous of any central governing authority.
    • Privacy: User identify protected. People should not be able to figure out two a user is based on the transaction.
    • Off-line Payments: Bitcoin transactions require validation by trusted peers which occurs online. It should be noted that there is the ability to store bitcoin in an off-line wallet.
    • Transferability: Bitcoin may not only be used in merchant transactions for goods and services, it may also be transferred to other users.
    • Divisibility: By utilizing Merkle trees, bitcoin is able to be broken down into smaller units.

The success of Bitcoin is heavily attributed to its use of blockchain technology. Blockchain is an expanded concept of a distributed ledger. It consists of cryptographically signed and irrevocable records shared within a network. The components of these records can be traced back to a single transactional event (Holgate, Furlonger, & Howard, 2019). Participants within Bitcoin’s peer-to-peer network are incentivized to validate other transactions. These participants are trusted third parties, and they are the component that many earlier iterations of cryptocurrency were missing to ensure the decentralization of the coin itself (Stoll, Klaaben, & Gallersdorfer, 2019). While bitcoin may seem to be an idyllic form of currency, there are some deterrents that make this currency unattractive from an environmental perspective.

Bitcoin Environmental Impact

There is a high carbon footprint that is associated with bitcoin mining. Bitcoin is based off of a “proof-of-work” (PoW) algorithm. The validation of the bitcoin occurs by allowing distributed nodes to run mining software to solve a cryptographic puzzle (Hassan, Rehmani, & Chen, 2021). Each bitcoin transaction requires six different confirmations to validate the transaction (Lei, Xie, Tu, & Liu, 2020). These confirmations expend a high amount of energy, which produces an excessive amount of carbon emissions. Some estimations associate the carbon cost of a single bitcoin to be as high as 191 tons of carbon dioxide. While in some locations this may be offset by green energy initiatives, the impact that bitcoin mining is having on our planet’s health is astounding.

This impact was one of many issues addressed in the Paris Agreement (COP21). The goal of this collaboration was to limit carbon emissions. As a result of these proceedings, 196 countries agreed to pursue the goal of carbon neutrality (DiFebo, Ortolano, Foglia, Leone, & Angelini, 2021). Carbon neutrality occurs when carbon emissions are offset by carbon sinks (primarily trees and various oceanic flora). The issue of Bitcoin’s inflated energy use being addressed in such a public global forum subsequently created a consumer-driven need for an ecological solution (Leonhard, 2017).

Addressing the Negative Environmental Impact of Cryptocurrency

To offset some of these negative effects, more energy efficient ways to validate cryptocurrency have been created. As discussed above, proof-of-work (PoW) was the primary impactor of energy use for Bitcoin. Ethereum and Cardano are respectively the second and third most prevalent systems of cryptocurrency by market cap behind Bitcoin. Both of the aforementioned systems are in the process of adopting and/or strengthening “proof-of-stake” (PoS) algorithms. Proof-of-stake was created as an alternative to PoW. With this type of protocol, a validator is randomly assigned to create new blocks and share them within the network. This greatly reduces the need for excessive computational work. With this type of protocol, we see benefits in the form of energy efficiency, reduced hardware requirements, and optimized decentralization due to allowing for more nodes within the network (Ethereum, 2021).

Ethereum was founded by a team of four cryptographers in 2013, led by Vitalik Buterin. While Ethereum currently utilizes a PoW protocol, there is a pending merge with Ethereum 2.0. Ethereum 2.0 is an adaptation of the original Ethereum that utilizes a PoS algorithm. To implement this adaptation, Ethereum is creating a “fork” in their primary codebase. This fork occurs when a codebase is copied from one repository to another. The concerns around green-initiatives the within the cryptocurrency community was the driving factor for this fork development (Ethereum, 2021) .

Cardano was developed by Charles Hoskinson, who is also one of the founders of Ethereum. Cardano is able to process 1,000 transactions a second on its network. Comparatively, Bitcoin can process up to seven transactions a second on their network (Lacey, 2021). Cardano is one of the most well-known cryptocurrencies on the market today. While PoS has been applauded within the cryptocurrency community. This protocol is still in its infancy. Not only has the security of this validation process been questioned, but also the potential for many unknowns have been highlighted. Ethereum and Cardano are working tirelessly to prove this system within the field. It is highly likely that PoS will surpass the utility of PoW.

By comparing the attributes of proof-of-work against proof-of-state, it is clearly illustrated that the cryptocurrency community is focusing on a more environmentally sustainable framework. This focus is helping to alleviate the previous belief that cryptocurrency is detrimental to the environment. While leading platforms such as Ethereum and Cardano are revolutionizing the cryptocurrency industry with environmentally-conscientious protocols, there is also a push for incentivizing green initiatives on a systemic scale.

Carbon Credits

Incentivizing countries to focus on green initiatives, as discussed previously, was the goal of The Paris Agreement. Through this agreement initiated by the United Nations Framework Convention on Climate Change (“UNFCCC”), participating countries committed to submitting annual emissions reductions goals. If they were to fall short of these goals, they were able to purchase “credits” from other nations that were in excess of their targeted reduction goals. This system of buying and setting carbon emissions credit is traditionally referred to as a “carbon market.” The original iteration was faulty due to the large amount of autonomy countries had for reporting their own emissions data. There was a high incentive for a nation to report fraudulent data with this system because carbon credits could contribute to a nation’s economy. This system had a greater potential of success when implementing blockchain technology to track carbon credits. Through this process, “Decentralized Autonomous Organizations,” which consist of teams of climatologists, issue carbon credits to private parties that show proof that they’re offsetting carbon emissions. (Leonhard, 2017)

The carbon market is a complex system due to the varying degrees of entities within the market. Primary transactors within the market include countries, industrial organizations, and nonprofits that support carbon sinks (natural carbon emission off-setters). Using this carbon market, carbon credits are not only issued to various countries, but may be issued to companies throughout various industries that are successful in reducing their carbon emissions (Leonhard, 2017). These carbon credits can be purchased by entities who have not met their emissions reduction goals. Examples of how various entities can obtain carbon credits (as well as likely uses for these credits) are:

  • Company A: Company A owns 15 acres of forest. This company commits to preserving the land instead of deforesting or building a new facility on the land. The resulting credits can be monetized through sale to another entity or used as a tax credit.
  • Company B: Company B is allotted ten ‘units’ of carbon emissions. They only use eight of those units. Those two unused units can be exchanged for carbon credits. Those carbon credits can also be banked for later, monetized, or used as a tax incentive.
  • Non-profit A: Non-profit A restores mangrove forests, which are carbon sinks (earlier it was noted that carbon sinks negate carbon emissions by absorbing carbon in the atmosphere). Assuming their organization does not require an allotment of carbon emissions units, their carbon offset could then be translated into carbon credits. These carbon credits can then be monetized, allowing the non-profit to have access to an additional revenue stream to grow their initiatives.
  • Country A: Country A is an underdeveloped country. Their maintain a negative carbon emission balance, which can be translated into carbon credits. These carbon credits can be monetized and provide a necessary revenue stream to impoverished countries. Funds derived from carbon credits can be used to provide aid and help in the development of impoverished nations (Leonhard, 2017).

These entities are just a few examples of the actors that participate in the blockchain-based carbon market. Thanks to the utility of a block-chain based carbon market, we can anticipate a variety of environmentally conscientious applications that may emerge in the future.

Future Use Case

Countless creative carbon credit blockchain ideas exist that could have a significant disruption on a given industry if mass adopted. One particular use case is a token to represent a store of value based on carbon credits. Most credit cards provide cash back or points to their customers. A new card could give a user “carbon credits” stored on the Ethereum blockchain. Rather than 5 cents cashback, the user could earn five carbon tokens. These tokens could be used later as carbon offsets for their business or traded with potential brand partners of the card for experiences or merchandise. Various entities, such as retailers, event venues, or even countries, could recognize these tokens and provide incentives such as tax benefits in exchange for the points (Leonhard, 2017) The card company would take the money the user would otherwise be getting back as far as rewards and use it as part of a carbon offset program with its partners, (investing in alternative energy or donating to an organization that saves mangroves for example).


The evolution of cryptocurrency has been a fascinating one. While initially cryptocurrency had only a negative environmental impact, opportunities arose from these emerging technologies to incentivize conservation efforts. William Pazos, co-founder of AirCarbon, states that “The entire concept behind carbon trading and offsets is to employ the profit motive in order to push decisions towards climate change mitigating activities.” (Twidale & Nasralla, 2021). By paving the way for carbon credits, developments in cryptocurrency have paved the way to preserving our planet.


Baldridge, R. (2021, May 22). Why the Father of Bitcoin is Nowhere to be Found. Retrieved from Robb Report:

DiFebo, E., Ortolano, A., Foglia, M., Leone, M., & Angelini, E. (2021). From Bitcoin to carbon allowances: An asymmetric extreme risk spillover. Journal of Environmental Management.

Ethereum. (2021, July 29). Retrieved from PROOF-OF-STAKE:

Farell, R. (2015). An Analysis of the Cryptocurrency Industry. Wharton Research Scholars.

Hassan, M., Rehmani, M., & Chen, J. (2021, June 28). Optimizing Blockchain Based Smart Grid Auctions: A Green Revolution. Retrieved from[accessed%2005/30/21].pu

Holgate, R., Furlonger, D., & Howard, R. (2019, May 8). Gartner. Retrieved from Evaluating Promising and Maturing Blockchain Use Cases in Government:

Ishikawa, M. (2017). Designing Virtual Currency Regulation in Japan: Lessons from the Mt Gox Case. Journal of Financial Regulation, 125-131.

Lacey, R. (2021, July 22). The Times Money Mentor. Retrieved from Everything you need to know about eco-friendly cryptocurrencies:

Lei, X., Xie, T., Tu, G., & Liu, A. (2020). An Inter-blockchain Escrow Approach for Fast Bitcoin Payment. 2020IEEE 40th International Conference on Distributed Computing Systems, 1201-1202.

Lemieux, P. (2013, Fall). Who is Satoshi Nakamoto? Regulation, p. 14+.

Leonhard, R. (2017, July 11). Developing the Crypto Carbon Credit on Ethereum’s Blockchain. Retrieved from SSRN Electronic Journal:

Narayanan, A., Bonneau, J., Felten, E., Miller, A., & Goldfeder, S. (2016). Bitcoin and Cryptocurrency Technologies. Princeton: Princeton University Press.

Okamoto, T., & Ohta, K. (1991). Universal Electronic Cash. Advances in Cryptology – CRYPTO ’91 (pp. 324-337). Spring, Berlin, Heidelberg.

Rivest, R. (1990). Algorithms and Complexity. Handbook of Theoretical Computer Science, 717-755.

Singh, G. (2009). Understanding Carbon Credits. New Delhi: Aditya Books Pvt. Ltd.

Stoll, C., Klaaben, L., & Gallersdorfer, U. (2019, July 17). The Carbon Footprint of Bitcoin. Joule, 1647-1661.

Wang, Q., Li, R., & Chen, S. (2021). Non-Funcible Toke (NFT): Overview, Evaluation, Opportunities and Challenges. Cornell University.

Six months ago or so it clearly stated in the Drupal docs to NOT create D8 modules due to the API not being finished. But people were still developing and porting D8 modules. I decided to try my hand at it and had a working module complete after a month or so. When I finally got Git access 6 months later to push my changes to Fancy Login, It had stopped working on the latest D8 build. This article covers the updates I had to make since the D8 API had changed.

UPDATE: this article is quite old and D8 core is now complete.

1. Moved FancyLoginSettingsForm.php rom folder fancy_login/src to fancy_login/src/Form folder

2. In FancyLoginSettingsForm.php file changed translate functions t(). for example

t('Text !url.', array('!url' => 'background-

color')) to t('Text background-color', array('@url' =>


3. Moved the function user_login_block_ajax_callback from file FancyLoginSettingsForm.php to

fancy_login.module file.

4. Moved libraries such as




from FancyLogin_loginForm.php file to fancy_login.module file.

5. Deleted library

use Drupal\Core\Ajax\AppendCommand;

from FancyLogin_loginForm.php file.

6. Moved function ser_pass_ajax_callback from FancyLogin_passForm.php file to fancy_login.module


7. Moved library

use Drupal\lightbox_login\Ajax\lightboxLoginClosePopupCommand;

from FancyLogin_passForm.php file to fancy_login.module file.

8. In folder fancy_login/src/Plugin/Block

a) Added rows


* @file

* Contains \Drupal\fancy_login\Plugin\Block\FancyLoginBlock.


to FancyLoginBlock.php file.

b) Changed code from

$GLOBALS['user']->isAnonymous() || !empty($GLOBALS['menu_admin'])



in build function in FancyLoginBlock.php file.

9. In folder fancy_login/src/Controller

a) Deleted function

drupal_process_attached($form) in ajax_callback function in FancyLoginController.php file.

b) Changed row

$scripts = _drupal_add_js();


$scripts = drupal_js_defaults();

in ajax_callback function in FancyLoginController.php file.

10. In fancy_login.module file

a) in functions user_login_block_ajax_callback and user_pass_ajax_callback

changed argument to no longer pass by reference from

array &$form



b) In functions user_login_block_ajax_callback and user_pass_ajax_callback

changed rows

$messages = array('#theme' => 'status_messages');

$messages = drupal_render($messages);


$renderer = \Drupal::service('renderer');

$messages = array('#type' => 'status_messages');

$messages = $renderer->renderRoot($messages);

c) In function user_login_block_ajax_callback

changed row

$response->addCommand(new AppendCommand('#lightbox_login_user_login_block_wrapper',



$selector = '#fancy_login_user_login_block_wrapper';


$response->addCommand(new Ajax\AppendCommand($selector, $messages));

d) in function user_pass_ajax_callback

changed row

$response->addCommand(new AppendCommand('#lightbox_login_user_pass_block_wrapper',



$selector = '#lightbox_login_user_pass_block_wrapper';


$response->addCommand(new Ajax\AppendCommand($selector, $messages));

e) in function fancy_login_page_bottom

changed row

GLOBALS['user']->isAnonymous() || !empty($GLOBALS['menu_admin'])



f) in function fancy_login_page_bottom

changed row

$login_path = \Drupal::service('path.alias_manager')->getAliasByPath('user/login');


$login_path = \Drupal::service('path.alias_manager')->getAliasByPath('/user/login');

g) in function fancy_login_page_bottom

changed row

'callback' =>



'callback' => 'user_login_block_ajax_callback',

h) in function fancy_login_page_bottom

changed row

'callback' => 'Drupal\lightbox_login\Form\lightboxLogin_passForm::user_pass_ajax_callback',


'callback' => 'user_pass_ajax_callback',

11. In folder fancy_login/js in file fancy_login.js

changed all methods to use each in JQuery

$("body").once("fancy-login-init", function () {


$("body").once("fancy-login-init").each(function () {

All of these changes were necessary for the module to work.