Keeps booting into emergency mode, swap errors

Moved my media server over to a new case last nigth and ever since it will only boot into emergency mode. I am also getting “failed to activate swap /swapfile” error as posted here. I have a 120 GB M2 SSD as the system drive with 2 partitions. I also have a HDD that has my media files on it.

/swapfile

Here is output of cat /etc/fstab – I know it’s wrong – but it is in read only mode. I also don’t know how to find the UUID of the extra HDD

cat /etc/fstab

I know there is likely more info needed – please let me know

Removed class use still throws errors

In system.log, I keep receiving the error main.CRITICAL: Class Magento\Framework\EscapeHelper does not exist. I’ve removed/changed all references to this class, and when I grep the website the only result returned is the system.log file itself. What could be causing this?

I’ve blown caches, generated code, and static content to bits with no success.

Running Magento 2.2.9

Website errors

Dear,
I am working to build up a website with blogger and I’m a beginner in HTML coding. This is my current website that I am still working at: https://howtoplaystation.blogspot.com/
Can you please help me with this problem?
Why are the pictures on the right side( popular tab) cropped? How can I fix it? They are also cropped here: https://howtoplaystation.blogspot.com/2019/07/blog-post.html at the bottom( in the “YOU MIGHT ALSO LIKE” tab)

Thank you very much in advance!

Search for files having bad I/O errors

I tried to mount iOS device on Ubuntu to copy/backup images. The DCIM folder has lots of files. For some reason, many of them has “Failed to open file (Input/output error)” error when trying to open them. They are intermingled with good files.

I want to delete all those image files with those errors, but don’t want to go through them one by one to find out what file is good and what file cannot be opened.

Is there a way to detect those bad files from command lines?

~/usr/mnt/DCIM/101APPLE$   ll -1rth total 614M -rw-r--r--  2 gdhp gdhp 2.1M May  4 13:01 IMG_1568.JPG -rw-r--r--  2 gdhp gdhp 1.7M May  4 13:01 IMG_1562.JPG -rw-r--r--  2 gdhp gdhp 3.8M May  4 13:01 IMG_1063.JPG -rw-r--r--  2 gdhp gdhp 1.4M May  4 13:04 IMG_1816.JPG -rw-r--r--  2 gdhp gdhp 190K May  4 13:04 IMG_1517.JPG  # bad I/O -rw-r--r--  2 gdhp gdhp 1.3M May  4 13:06 IMG_1811.JPG -rw-r--r--  2 gdhp gdhp 668K May  4 13:06 IMG_1263.JPG -rw-r--r--  2 gdhp gdhp 1.3M May  4 13:06 IMG_1048.JPG -rw-r--r--  2 gdhp gdhp 3.0M May 16 11:20 IMG_1172.JPG  # bad I/O -rw-r--r--  2 gdhp gdhp 2.6M May 16 11:21 IMG_1175.JPG -rw-r--r--  2 gdhp gdhp 1.5M May 17 18:29 IMG_1727.PNG ... 

Search for files having bad I/O errors

I tried to mount iOS device on Ubuntu to copy/backup images. The DCIM folder has lots of files. For some reason, many of them has “Failed to open file (Input/output error)” error when trying to open them. They are intermingled with good files.

I want to delete all those image files with those errors, but don’t want to go through them one by one to find out what file is good and what file cannot be opened.

Is there a way to detect those bad files from command lines?

~/usr/mnt/DCIM/101APPLE$   ll -1rth total 614M -rw-r--r--  2 gdhp gdhp 2.1M May  4 13:01 IMG_1568.JPG -rw-r--r--  2 gdhp gdhp 1.7M May  4 13:01 IMG_1562.JPG -rw-r--r--  2 gdhp gdhp 3.8M May  4 13:01 IMG_1063.JPG -rw-r--r--  2 gdhp gdhp 1.4M May  4 13:04 IMG_1816.JPG -rw-r--r--  2 gdhp gdhp 190K May  4 13:04 IMG_1517.JPG  # bad I/O -rw-r--r--  2 gdhp gdhp 1.3M May  4 13:06 IMG_1811.JPG -rw-r--r--  2 gdhp gdhp 668K May  4 13:06 IMG_1263.JPG -rw-r--r--  2 gdhp gdhp 1.3M May  4 13:06 IMG_1048.JPG -rw-r--r--  2 gdhp gdhp 3.0M May 16 11:20 IMG_1172.JPG  # bad I/O -rw-r--r--  2 gdhp gdhp 2.6M May 16 11:21 IMG_1175.JPG -rw-r--r--  2 gdhp gdhp 1.5M May 17 18:29 IMG_1727.PNG ... 

Magento 1 on Percona DB produces errors

We are trying to migrate our DB to MySQL 5.7 on Percona XtraDB cluster.

In the MySQL log file there are errors preventing some operations to be performed.

The errors visible with the current setting are of 2 types:

2019-06-24T08:00:03.187120Z 99531 [ERROR] WSREP: Percona-XtraDB-Cluster prohibits use of GET_LOCK with pxc_strict_mode = ENFORCING

or

2019-06-24T08:39:21.115870Z 100000 [ERROR] WSREP: Percona-XtraDB-Cluster prohibits use of DML command on a table (log_url) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

Currently the DB cluster is set with

pxc_strict_mode=ENFORCING

Note, we have tried to set up a different mode and locked for stabilizing the BD using the following mode without success

pxc_strict_mode=PERMISSIVE

But the result is instability at the engine level ending in the whole database being unresponsive and requiring a reboot.

However when setting the mode to PERMISSIVE we have the following errors matching the one above:

2019-06-18T09:30:55.552852Z 753 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of GET_LOCK with pxc_strict_mode = PERMISSIVE

2019-06-18T09:30:55.570212Z 753 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of RELEASE_LOCK with pxc_strict_mode = PERMISSIVE

Or

2019-06-17T15:30:18.766308Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_product_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.770449Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_product_index_enbl_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.795257Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_anc_categs_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.797970Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_anc_categs_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

Having this information shows that there are missing primary keys on at least these tables:

  • catalog_category_product_index_idx

  • catalog_category_product_index_enbl_idx

  • catalog_category_anc_categs_index_idx

  • … and possibly others

Can we add a primary key on these tables ? or is there a setting that I missed regarding the following configuration with the following environment ?`

Environment is composed of:

o MySQL 5.7

o Percona XtraDB cluster

o Magento 1.9.4.1

Package system is broken – errors encountered while processing packages ‘libpng12-0:amd64’ and ‘libpng12-0:i386’

The package system is broken

Check if you are using third party repositories. If so disable them,
since they are a common source of problems. Furthermore run the
following command in a Terminal: apt-get install -f Transaction
failed: The package system is broken The following packages have
unmet dependencies:

libpng12-0: Depends: libc6 (>= 2.14) but 2.23-0ubuntu10 is installed
Depends: zlib1g (>= 1:1.1.4) but 1:1.2.8.dfsg-2ubuntu4.1 is installed
libpng12-0:i386: Depends: libc6 (>= 2.11) but 2.23-0ubuntu10 is installed
Depends: zlib1g (>= 1:1.1.4) but 1:1.2.8.dfsg-2ubuntu4.1 is installed

sudo dpkg --configure -a

dpkg: error processing package libpng12-0:amd64 (–configure):
package libpng12-0:amd64 1.2.54-1ubuntu1 cannot be configured because
libpng12-0:i386 is at a different version (1.2.54-1ubuntu1.1) dpkg:
error processing package libpng12-0:i386 (–configure): package
libpng12-0:i386 1.2.54-1ubuntu1.1 cannot be configured because
libpng12-0:amd64 is at a different version (1.2.54-1ubuntu1) Errors
were encountered while processing: libpng12-0:amd64
libpng12-0:i386

Also tried
sudo apt update --fix-missing
sudo apt install -f

or even to force remove ‘libpng12-0:i386’ that results in
sudo dpkg --remove --force-remove-reinstreq libpng12-0:i386

dpkg: dependency problems prevent removal of libpng12-0:i386: libfreetype6:i386 depends on libpng12-0 (>= 1.2.13-4). libgd3:i386 depends on libpng12-0 (>= 1.2.13-4).

dpkg: error processing package libpng12-0:i386 (–remove): dependency problems – not removing Errors were encountered while processing: libpng12-0:i386

Adding custom JS to existing module causing errors

So I’ve been trying to add some custom javascript to a module, however when the JS is added it works fine in itself, but it causes alot of errors for alot of different scripts, and I can’t figure out how to stop it from causing that.

What I have done now is load the custom JS using the require-config.js in Module/Namespace/view/fronted, using the following code:

var config = { map: {     '*': {         module: "Module_Namespace/js/view/customFolder/customScript",     } },  shim: {     'module': {         deps: ['jquery']     } },  deps: [     "js/view/customFolder/customScript" ] 

};

My custom script is located in Module/Namespace/view/frontend/web/js/view/customFolder/customScript.js.

If I use the regular js templates that Magento use the entire scripts won’t work however:

define([ 'jquery', 'jquery/ui' ], function ($  ) { "use strict";  $  .widget('namespace.customScript', {     __create: function() {         this.testAlert();     },      testAlert: function() {         alert('testAlert');     } });  return $  .namespace.customScript; }); 

This will give the following error:

Uncaught Error: Script error for: js/view/customFolder/customScript http://requirejs.org/docs/errors.html#scripterror at makeError (require.js:166) at HTMLScriptElement.onScriptError (require.js:1681) 

Followed by alot of the following error:

mixins.js:117 Uncaught TypeError: module.config is not a function at Object.getMixins (mixins.js:117) at Object.hasMixins (mixins.js:138) at processName (mixins.js:161) at Array.map (<anonymous>) at Object.processNames (mixins.js:169) at window.define (mixins.js:258) at scripts.js:6 

However, if I put an alert at the very top of the custom JS (above the define) it will replace all of the module.config errors with these:

Uncaught TypeError: Cannot read property 'config' of undefined at Object.getMixins (mixins.js:117) at Object.hasMixins (mixins.js:138) at processName (mixins.js:161) at Array.map (<anonymous>) at Object.processNames (mixins.js:169) at window.define (mixins.js:258) at translate.js:9 at translate.js:16 

I have no clue how to solve these errors, but I just need to load a simple javascript into a existing module. Is there a better way to do it then this, or can I try anything to debug/fix these errors?

Thanks in advance!

What is the best practice to show errors when parsing a large csv file?

I am designing the experience for uploading and validating a large CSV file, which can possibly have as many as 20,000 rows.

It will really help if there was some way to show the user all the row numbers which have errors, as well as that the error is. It’s OK if there are 10-15 errors, but what if there are 1000+ rows that have errors?

Currently, I am planning to solve this problem by not mentioning faulty row numbers at all but just showing all the possible types of errors that may be in the file. See below –

enter image description here

What is the best way to show errors for large files and when there can be thousands of errors, and to make the errors as helpful and descriptive to the users as possible?