Error fn.common.php

Hello everyone,
I am trying to import products via an addon. Everything was working ok, but the last two days, I do not know what changed (either from eshop or hosting provider), but getting this message

### Error at

app/functions/fn.common.php, line: 2868

### Backtrace

|File:|app/functions/fn.common.php|
| --- | --- |
|Line:|2868|
|Function:|**{closure}**|
|File:|app/Tygh/BackendMenu.php|
|Line:|362|
|Function:|**fn_check_view_permissions**|
|File:|app/Tygh/BackendMenu.php|
|Line:|114|
|Function:|**_processItems**|
|File:|app/controllers/backend/init.php|
|Line:|157|
|Function:|**generate**|
|File:|app/functions/fn.control.php|
|Line:|727|
|Function:|**include**|
|File:|app/functions/fn.control.php|
|Line:|458|
|Function:|**fn_run_controller**|
|File:|diaxirisi.php|
|Line:|25|
|Function:|**fn_dispatch**|

and the import is stuck… Tried to clear cache, re-run the import but no luck! Any advice please?

thanks

What addon are you using? If it’s a 3rd party developed addon contact the developer.
Have you done any updates or your hosting provider made any server related changes lately? Try to track back the issue since the last time it used to work.

Thanks for your answer… It is a 3rd party addon… Although, the import was working, nothing changed or added to cs-cart… I have a managed server but from my hosting provider does not have any answers for that… Could we safely rule out cs-cart? Any ideas, where to search or do?

thanks

Make sure the addon is compatible with your cs-cart version. Also, I would first check with the guys that have created the addon before anything else.

@krasnek thank you for your time.
The addon actually is an importer… I succeed to import lots of CSV - XML files. But there is one that I could not… I could not reach the dev guy who made this addon. Sort of, I am in a dead end.

My hosting provider told me that has been done changes like, plugins/apps of cPanel, like tailwatchd, theme jupiter, firewall, Imunify360, and JetBackup. I believe none of these could cause any problems…

How could I collect more info from logs, in order to find Fatal errors, or notices or anything that I could manage to solve the issue? I have already open the logs from cs-cart… Is there anything more I could do?

thanks in advance

It seems that the most important part of the bug is missing from the code provided. The beginning where the cause of the error is described is missing. Could you please check that you have copied it in full?

1 Like

Thanks for the response…
I have copied the whole message that get… Here it is:

## PHP Warning

### Message

Undefined array key 2

### Error at

app/functions/fn.common.php, line: 2868

### Backtrace

|File:|app/functions/fn.common.php|
| --- | --- |
|Line:|2868|
|Function:|**{closure}**|
|File:|app/Tygh/BackendMenu.php|
|Line:|362|
|Function:|**fn_check_view_permissions**|
|File:|app/Tygh/BackendMenu.php|
|Line:|114|
|Function:|**_processItems**|
|File:|app/controllers/backend/init.php|
|Line:|157|
|Function:|**generate**|
|File:|app/functions/fn.control.php|
|Line:|727|
|Function:|**include**|
|File:|app/functions/fn.control.php|
|Line:|458|
|Function:|**fn_run_controller**|
|File:|xxxxxx.php|
|Line:|25|
|Function:|**fn_dispatch**|

## PHP Warning

### Message

Undefined array key 2

### Error at

app/functions/fn.common.php, line: 2868

### Backtrace

|File:|app/functions/fn.common.php|
| --- | --- |
|Line:|2868|
|Function:|**{closure}**|
|File:|app/Tygh/BackendMenu.php|
|Line:|362|
|Function:|**fn_check_view_permissions**|
|File:|app/Tygh/BackendMenu.php|
|Line:|114|
|Function:|**_processItems**|
|File:|app/controllers/backend/init.php|
|Line:|157|
|Function:|**generate**|
|File:|app/functions/fn.control.php|
|Line:|727|
|Function:|**include**|
|File:|app/functions/fn.control.php|
|Line:|458|
|Function:|**fn_run_controller**|
|File:|xxxxx.php|
|Line:|25|
|Function:|**fn_dispatch**|

## PHP Warning

### Message

Undefined array key 2

### Error at

app/functions/fn.common.php, line: 2868

### Backtrace

|File:|app/functions/fn.common.php|
| --- | --- |
|Line:|2868|
|Function:|**{closure}**|
|File:|app/Tygh/BackendMenu.php|
|Line:|362|
|Function:|**fn_check_view_permissions**|
|File:|app/Tygh/BackendMenu.php|
|Line:|114|
|Function:|**_processItems**|
|File:|app/controllers/backend/init.php|
|Line:|157|
|Function:|**generate**|
|File:|app/functions/fn.control.php|
|Line:|727|
|Function:|**include**|
|File:|app/functions/fn.control.php|
|Line:|458|
|Function:|**fn_run_controller**|
|File:|xxxxx.php|
|Line:|25|
|Function:|**fn_dispatch**|

[continue](https://xxxxx.gr/xxxxxx.php?dispatch=nt_import_products.lists)

I have this in my config.local.php file

define('DEVELOPMENT', true);
define('DEBUG_MODE', true);

Any ideas? thanks in advance

It seems that a scheme used by some third party add-ons is broken and prevents the installation from working properly. Try checking the

app/addons/[add-on_name]/schemas/menu/

folders of the installed add-ons. Some of them seems to contain incorrect structure.

Hello again I will check what you said… ut sounds weird. I did not make any updates to addons or install new ones. Could this be happened by deactivate / activate addons? And how is it possible to effect the importing products? I could not understand the connection between them… but i will give it a try of what you said

Thanks, i will let you know

1 Like