Setup version for module is not specified – Magento 2



So, you have uploaded/installed/created a new module in Magento 2.x and when access a page after cleaning cache, it shows error: Setup version for module ‘Module’ is not specified.
You open up the module.xml file of your module and to your surprise the setup version is already specified in the config.
So, what makes this error to come out?

Another surprise for you, the error is related to the file system permission. As soon as you update the file system permission by running below command in your Magento 2 installation directory the error will disappear.
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento

CSS Inline Error: Warning: DOMXPath::query(): Invalid expression ...emogrifier/Classes/Emogrifier.php on line

Emogrifier tool is great and makes our life easy when it comes to managing CSS for many email templates and keeping track in the version control system as well.

Have you run suddenly in CSS inlining error when using Emogrifier tool and not sure where to start the debugging.
The error pops when converting styles from a CSS file to the inline style attribute of the applicable tags with Emogrifier tool.

A few style declarations especially some wild card CSS selectors are not supported in the version 0.1.1 of emogrifier.
In Magento2 it fires the error somewhere at line number 269.

Looking in the code, it creates xpath from the CSS selectors. So the error is generated while parsing some specific CSS selectors.
The code statement is $nodesMatchingCssSelectors = $xpath->query($this->translateCssToXpath($value['selector']));

Changing the statement to
    $nodesMatchingCssSelectors = $xpath->query($this->translateCssToXpath(preg_replace('/[\[\^\*\]]*/', '', $value['selector'])));
    solves the CSS inlining error as it ignores the wildcard CSS selectors.

Make sure you are not using any wildcard CSS selector for defining styles of your emails.

Stopped after Upgrading to Windows 10 - Apache, Nginx, Web server, Wamp, XAMPP, Wampstack



So, you are also one of them who have recently upgraded to Window 10 and enjoying the next generation OS.

But the excitement didn’t last long as soon as you found that your web server has stopped working. Whatever application you might be using Wamp, Wampstack, XAMPP, Wnmp, LAMP, LEMP or Isolated installation of Apache / Nginx. It was stuck. And you also know that it is port 80 which is used by a web server is now being used by some other application. You might be wondering if it’s Skype which also listens to port 80 interrupted you web server and your web server (wamp, wampstack, XAMPP, Apache, Nginx) stopped. But it is also not the case.

Windows 10 comes with an automatically enabled service namely ‘World Wide Web Publishing Service’. ‘World Wide Web Publishing Service’ listens to port 80 and starts automatically. As port 80 is already occupied by ‘World Wide Web Publishing Service’, your Wamp, Wampstack, XAMPP, Apache, Nginx stopped starting.

You can stop the service as well as change its settings to start manually only. Go to services (type ‘services’ in Cortana or run box to find quickly) and stop the service ‘World Wide Web Publishing Service’ and voila your Wamp, Wampstack, XAMPP, Apache, Nginx have now started working. To avoid stopping the service with every boot up, you may also change the settings to Manually start it.

Ubuntu - phpinfo shows old version after PHP 7.0 upgrade

So, you are also among those who took peek sneak of php 7.0 using the ppa:ondrej.

And now after upgrading php7.0 version, you are still seeing old version in your phpinfo file. And, you might be seeing the updated PHP version while viewing in CLI (php -v).

So, all you need to do is to remove php7.0 (yes, remove php7.0) and then install it again. But make sure you run the commands in following order.

$ apt-get remove php7.0
$ apt-get remove php7.0-common
$ apt-get update
$ apt-get autoremove
$ apt-get update
$ apt-get install php7.0 php7.0-common
$ apt-get update
$ service [YOUR WEB SERVER SERVICE] restart

This should resolve your issue of PHP 7.0 version which was not showing correctly in the phpinfo file.