How to remove this error? - magento-2.0

There has been an error processing your request
Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Magento_CustomWidget schema: current version - none, required version - 2.0.0
Magento_CustomWidget data: current version - none, required version - 2.0.0
Error log record number: 1078485663282
my code is module.xml
<?xml version="1.0"?>
`<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"` xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magento_CustomWidget" setup_version="2.0.0"/>
</config>

I had the similar issue and it's likely to be caused by renaming your module(ie: when you try to make a backup copy and leave it in the same directory, ideally we should first disable the module then make a copy), and you must have run bin/magento setup:upgrade - not knowing that you're registering two identical module into database.
How I did to fix the issue was to go to database table: setup_module and find the entry in your case is: Magento_CustomWidget, then update the schema and data both to 2.0.0. It's an easy fix if you have phpmyadmin, see if it helps.

Related

Symfony: Loading .env.test files

I thought this PR fixed the issue I am having - but I have this patch and it's still not working as I expected - what am I missing or mis-understanding?
https://github.com/symfony/symfony/pull/28533
I have created a .env.test with the following:
DATABASE_URL_TEST=mysql://apps:#localhost:3306/mydb_test
Then I dropped a doctrine.yaml inside the config/packages/test directory.
Symfony v4.2.3
However when I run this command from CLI:
APP_ENV=test bin/console doctrine:database:create --env=test
I am getting an error:
Environment variable not found: "DATABASE_URL_TEST".
Clearly the .env.test file is not being loaded - how do I get a specific environment configuration file to load - other than .env???
If indeed your application was a Symfony 3.x application at some point, what I would guess is that, during the upgrade process, those two lines out of the UPGRADE procedure were missed:
Then, upgrade the contents of your console script and your front
controller:
bin/console:
https://github.com/symfony/recipes/blob/master/symfony/console/3.3/bin/console
public/index.php:
https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/public/index.php
Indeed, it seems like bin/console have been changed recently to reflect the adaptation done on the DotEnv component: https://github.com/symfony/recipes/commit/3e471cbc7d359b3ab245f3b0748d698e8d29692c#diff-2af50efd729ff8e61dcbd936cf2b114b
Mind that you'll also need https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/4.2/config/bootstrap.php
I had a very similar problem. My issue was that my phpunit.xml.dist was pointing to the wrong bootstrap file:
Previously:
bootstrap="vendor/autoload.php"
Changed to:
bootstrap="tests/bootstrap.php"

Needing assistance in prepping for a Drupal Migration with Manifest.yml

I am attempting to make a migration from D7 to D8 using Migrate Manifest. I have all the migrate modules installed (i.e. the 3 core migrate modules, Migrate Upgrade, Migrate Plus, Migrate Tools and Migrate Manifest). I followed the directions at this link: https://www.drupal.org/node/2350651 to prepare my manifest file. This is the relevant part of my resulting yaml file (truncated for brevity):
- block_content_body_field
- block_content_entity_display
- block_content_entity_form_display
- block_content_type
- d7_block
- d7_custom_block
When I ran the migrate-manifest via Drush, as specified by the directions in the link above, I received an error declaring a parse error pointing to the first line in the yaml list. This is the exact error: Unable to parse at line 1 (near " - block_content_body_field").
I tried several debugging steps:
I checked a yaml linter to see whether my file was properly formatted. My file passed the test.
I moved the block migrations below the ones that are prefixed with a 'd7' to match the example in the link.
I attempted a piecemeal migration of a file from my list of migrations, it worked.
I tried to alter the spacing on the list items.
All these steps failed to resolve the issue I am seeing.
I am unsure what other debugging steps I should take. All the above failed to resolve my issue.
Any ideas would be appreciated.

"Modules are Outdated" Error

I get this error when I create a new module:
"Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Sangeeta_Octan data: current version - none, required version - 0.0.1";i:1;s:1781:"#0
I searched on google and found no solution other than reinstalling Magento. Such as:
version has been changed from "2.0.0.0" to "2.0.0" during development,
so update tool can't recognize that "2.0.0.0" <= "2.0.0". Please,
re-install your application from scratch to get latest version. `
Do I have any options apart from reinstalling?
Change the setup_version of your module (Sangeeta_Octan) in
app/code/Sangeeta/Octan/etc/module.xml. Try a different version
name like setup_version="2.0.1" or setup_version="3.0.0"
Run bin/magento setup:upgrade
If that doesn't work, disable your module by changing your module name in app/etc/config.phpfrom Sangeeta_Octan => 1 to Sangeeta_Octan => 0. Then run bin/magento setup:upgrade
I hope below solution also solve your problem.
https://magento.stackexchange.com/questions/112293/mysql-error-and-possible-duplicates-running-bin-magento-setupupgrade-after-rena/112299#112299
in mysql find the table setup_module It will have 3 fields. Find the NULL values in data_version & have them match the schema_version
As an alternative, you can access your magento database and look at the table setup_module
You will see a list of all installed modules and you can manually set the schema/data version numbers here.
Delete the offending rows from the setup_module table (if they are there) and run the command bin/magento setup:upgrade from your Magento 2 root directory.
This is happens because of something wrong while running "bin/magento setup:upgrade" and the data_version in Module versions registry is null. It is loaded from DB, We can just proceed by manually changing it in db.
Go db via php myadmin and check "setup_module" table, the
data_version which are mentioned "null".
Login to Mysql database => then update table setup_module of the "data_version" column same as "schema_version"

Unrecognized option "firewall_name" under "hwi_oauth"

After upgrade of my project to symfony 2.8 I get the following error when I push the code to staging server.
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized option "firewall_name" under "hwi_oauth"
When i remove firewall_name option then I get an error that the option is required.
If someone provide some insight will be much appreciated.
You get this error now because when You was updating Symfony rest of dependencies was updated also.
This option was renamed to firewall_names to support multiple firewalls in this commit: https://github.com/hwi/HWIOAuthBundle/commit/9bdbc089ddffede12a5b575a441c4e0fa2ee9dd7 and released as part of 0.4.0 version.
Now it's value must be array. Example:
hwi_oauth:
firewall_names: [secured_area]

how to ant build liferay-yuicompressor.jar?

I am using liferay 5.2 sp 2 on weblogic 10.
I need liferay-yuicompressor.jar file in the lib folder of domain.
I am tryign to create .jar file as per described on this link:
http://issues.liferay.com/browse/LPS-3169
When i ant build-yui i am facing below exception.
get-swing-ex:
[mkdir] Created dir: D:\Liferay Material\GOSI\liferay-portal-src-5.2.2\liferay-portal-src-5.2.2\portal-impl\20130301133406114\rhino1_6R7\toolsrc\com\liferay\mozilla\javasc
ript\tools\debugger\downloaded
[get] Getting: http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip
[get] To: D:\Liferay Material\GOSI\liferay-portal-src-5.2.2\liferay-portal-src-5.2.2\portal-impl\20130301133406114\rhino1_6R7\toolsrc\com\liferay\mozilla\javascript\tool
s\debugger\downloaded\swingExSrc.zip
[get] http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip permanently moved to http://www.oracle.com/technetwork/java/index.html
[unzip] Expanding: D:\Liferay Material\GOSI\liferay-portal-src-5.2.2\liferay-portal-src-5.2.2\portal-impl\20130301133406114\rhino1_6R7\toolsrc\com\liferay\mozilla\javascri
pt\tools\debugger\downloaded\swingExSrc.zip into D:\Liferay Material\GOSI\liferay-portal-src-5.2.2\liferay-portal-src-5.2.2\portal-impl\20130301133406114\rhino1_6R7\toolsrc\co
m\liferay\mozilla\javascript\tools\debugger\downloaded
BUILD FAILED
As per my understanding it is trying to get the .zip file from http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip
but it is no longer available and moved to http://www.oracle.com/technetwork/java/index.html
I need your help in getting liferay-yuicompressor.jar file.
Please help me out...
Nakul, I was responding your other post facing exception while deploying liferay on weblogic. Sorry I misunderstood your last comment on that post, as I used LifeRay 6.x, not 5.x.
How about we disable the minification for the runtime so that you do not need to use the liferay-yuicompressor.jar.
You can add the below to portal-ext.properties
javascript.fast.load=false
theme.css.fast.load=false
If you still prefer to do minification for performance reason, you can do it during the build time as described here: http://yui.github.com/yuicompressor/. Between runtime and build time minification, I always prefer build time.
try to comment
<ant antfile="toolsrc/build.xml" target="compile"/>
into the root build.xml
more than that if you will have similiar problems with xbean.jar just set
without-xmlimpl: no
into build.properties file

Resources