checkAction() fatal error. Unknown action ID: 0

Hi,
I'm using Store module without any particular problems.

It seems that only one member can't view detail page of his Product, that means that he can view normally any other Product detail in the Store, but not the Product he has submitted to store.

 

Obviously, any other member can view this product detail.

Obviously, any other member that have submitted a Product in Store can view/edit his product detail.

 

Example of page and error for this member:
http://[mysite]/m/store/view/-Come-avviare-al-coding-realizzando-programmi-per-alunni-diversamente-abili

checkAction() fatal error. Unknown action ID: 0

Any suggestion? Is an acl problem only for this member? Is this a (strange) bug??

 

Quote · 13 Feb 2017

Yes, I find it strange that only one member out of all members is getting an undefined action error.  Create a test member; give it the same membership level and log in as that member, add a product to the store and then try to view the product to see if you can recreate the issue.

Geeks, making the world a better place
Quote · 13 Feb 2017

I encounter the same error. 

https://www.boonex.com/forums/topic/I-duplicated-the-articles-module-but-.htm

Quote · 14 Feb 2017

Thank you @mrtn  You have reason!

If I set this user not active (for example "not confirmed") he can see the Product in store. But as soon as he is active againg, the error occurs.

Any suggestion?

Quote · 16 Feb 2017

UPDATE. 

The error message is generated in this file:  /inc/membership_levels.php

 echo "<br /><b>checkAction()</b> fatal error. Unknown action ID: $actionID<br />"; 

In the admin section we do have the setting for the membership levels. But also there the modified install files made the correct installment (in my case like the articles module does). 

 

I had found this information here:  http://pdi-ug.de/index.php?thread/2210-checkaction-fatal-error-unknown-action-id-0/

 

This user stated that one should "make" an action id in the /inc/membership_levels.php  file  

 

But how? What difference is between the standard module and the copied module. Why does the standard user cause this error when viewing the arcticle (or shop element)?

 

Here is the code part

//no such action

if(mysql_num_rows($resMembershipAction) < 1)
{
echo "<br /><b>checkAction()</b> fatal error. Unknown action ID: $actionID<br />";
exit();
}

$arrAction = mysql_fetch_assoc($resMembershipAction);

$result[CHECK_ACTION_PARAMETER] = $arrAction['AdditionalParamValue'];
$arrLangFileParams[CHECK_ACTION_LANG_FILE_ACTION] = _t('_'.$arrAction['Name']);

Quote · 16 Feb 2017

if you duplicated a module - then the issue is that you did not change something appropriately - as an example - when duplicating the groups module, you can get this error if you change a 'group' value when you are not supposed to (there are some values that should remain as they are because they have a different meaning than what it may seem). As I have never duplicated the articles module - i really cant tell you exactly what needs to be changed back to its original value.

caredesign.net
Quote · 17 Feb 2017

I understand what you are saying. But i dont think that this is valid here. Because it works for admin user and also new users and guests. Only when the new user is confirmed then the error is showen. I suppose when your theory would be right then it would not work for each user. 

When i made the changes i only did this (for example)

 

change the letters of the files

 

a)  Arl zu Tst

 

change inside the code

 

a) von Articles zu Tester

b) von articles zu tester

 

Präfix ändern

 

a) von Arl zu Tst

b) von arl zu tst

 

I search and replaced according to length and Capital and non capital letters. And the result worked out except for this error in actions.

 

But i am checking now every position of Arl and arl manually. Maybe your theory is correct after all.

Quote · 17 Feb 2017

AlexT told me the solution to my problem. 1 time only the word ARTICLES was written in capital letters. Maybe that is your problem too.

In my case it was file: BxArlModule.php Line 155 

 

But i suppose that wont help you, as you did not modify anything, right?

Quote · 19 Feb 2017

I had a second identical episode, but with a different user and a different Article in "Store".

I have not duplicated any module, the installation of "Store" module was initially made correctly (...I believe) and these are the only two cases/bugs that occurred until now.

I'll look into php code looking for suggestions, starting from  /inc/membership_levels.php  (or what?)

 

But if I remove and reinstall "Store" module from admin panel, I'll lost all articles added by users? Which is the right way??

 

Thank you.

 

Andrea

Quote · 14 Mar 2017

I noticed that. In both cases, the URL of this two articles have a "-" at the beginning:
[site]/m/store/view/-Come-usare-LibreOffice-a-scuola
[site]/m/store/view/-Come-avviare-al-coding-realizzando-programmi-per-alunni-diversamente-abili

...perhaps the Article "Title" field was valued from the user with a string containing a blank space (or other char) at the beginning...

 

Is it possible that this causes a misalignment in DB?

 
Andrea
Quote · 14 Mar 2017

As I read, "Payment" Module and also the "Files" Module are requirements for "Store" Module.

I've found a big problem: module "Payment" is not installed (I think it's removed!).

 

Now I've added "Payment" Module again using Admin control panel (without errors), but my problem is not solved...

 

Do I have to remove and reinstall "Store" module?

Does this operation will NOT remove any Product in DB?

 

Please help me!

 

Andrea

screen2017-03-20 12:12:27.png · 100.5K · 355 views
Quote · 20 Mar 2017

Uninstalling module will remove all data from the DB.

I would suggest to run safe part of uninstall.sql and install.sql, for your case I hope it would be enough to run this:

 

-- removing membership levels
DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Name` IN('store view product', 'store browse', 'store search', 'store add product', 'store product comments delete and edit', 'store edit any product', 'store delete any product', 'store mark as featured', 'store approve product', 'store broadcast message');
DELETE FROM `sys_acl_actions` WHERE `Name` IN('store view product', 'store browse', 'store search', 'store add product', 'store product comments delete and edit', 'store edit any product', 'store delete any product', 'store mark as featured', 'store approve product', 'store broadcast message');


-- adding membership actions
SET @iLevelNonMember := 1;
SET @iLevelStandard := 2;
SET @iLevelPromotion := 3;

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store view product', NULL);
SET @iAction := LAST_INSERT_ID();
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store browse', NULL);
SET @iAction := LAST_INSERT_ID();
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store search', NULL);
SET @iAction := LAST_INSERT_ID();
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store add product', NULL);
SET @iAction := LAST_INSERT_ID();
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store product comments delete and edit', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store edit any product', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store delete any product', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store mark as featured', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store approve product', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store broadcast message', NULL);
Rules → http://www.boonex.com/terms
Quote · 20 Mar 2017

Thank you Alex!

 

So, if I've understood, I have to:

0) make a full backup (DB and files)

1) make a backup of uninstall.sql and install.sql (in public_html/modules/boonex/store/install/sql)

2) create an uninstall.sql file whit this TSQL rows

-- removing membership levels
DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Name` IN('store view product', 'store browse', 'store search', 'store add product', 'store product comments delete and edit', 'store edit any product', 'store delete any product', 'store mark as featured', 'store approve product', 'store broadcast message');
DELETE FROM `sys_acl_actions` WHERE `Name` IN('store view product', 'store browse', 'store search', 'store add product', 'store product comments delete and edit', 'store edit any product', 'store delete any product', 'store mark as featured', 'store approve product', 'store broadcast message');

3) create an install.sql file whit this TSQL rows

-- adding membership actions
SET @iLevelNonMember := 1;
SET @iLevelStandard := 2;
SET @iLevelPromotion := 3;

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store view product', NULL);
SET @iAction := LAST_INSERT_ID();
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store browse', NULL);
SET @iAction := LAST_INSERT_ID();
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store search', NULL);
SET @iAction := LAST_INSERT_ID();
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store add product', NULL);
SET @iAction := LAST_INSERT_ID();
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store product comments delete and edit', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store edit any product', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store delete any product', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store mark as featured', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store approve product', NULL);
INSERT INTO `sys_acl_actions` VALUES (NULL, 'store broadcast message', NULL);

4) uninstall and install "Store" module from Admin control panel

5) restore original version of uninstall.sql and install.sql files (in public_html/modules/boonex/store/install/sql)

 

Is it right?

 

Andrea

Quote · 20 Mar 2017

You can do this as you described, but it's the difficult way.

The easy way is to make backup then run SQL script I provided before in phpMyAdmin for your Dolphin database.

Rules → http://www.boonex.com/terms
Quote · 21 Mar 2017

Thank you AlexT.
I've executed TSQL commands, the output is at the bottom.

 

The problem remains the same (blank page with a "checkAction() fatal error. Unknown action ID: 0" message, as wrote in top of topic).

 

So I've invited une of the 2 users to delete his Product in Store, but he told me that obtain a "page not found" error.

I've deleted this Product from Admin user and invited the user to add a new one, after cleaning Title and other Product fields from special characters (especially at the beginning of the Title). 

 

This new Product is not affected from the bug (and of course it have not a "-" at the beginning of its title).

 

Andrea 

 

-- removing membership levels
DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Name` IN('store view product', 'store browse', 'store search', 'store add product', 'store product comments delete and edit', 'store edit any product', 'store delete any product', 'store mark as featured', 'store approve product', 'store broadcast message');# 61 righe modificate.

DELETE FROM `sys_acl_actions` WHERE `Name` IN('store view product', 'store browse', 'store search', 'store add product', 'store product comments delete and edit', 'store edit any product', 'store delete any product', 'store mark as featured', 'store approve product', 'store broadcast message');# MySQL ha restituito un insieme vuoto (i.e. zero righe).



-- adding membership actions
SET @iLevelNonMember := 1;# MySQL ha restituito un insieme vuoto (i.e. zero righe).

SET @iLevelStandard := 2;# MySQL ha restituito un insieme vuoto (i.e. zero righe).

SET @iLevelPromotion := 3;# MySQL ha restituito un insieme vuoto (i.e. zero righe).


INSERT INTO `sys_acl_actions` VALUES (NULL, 'store view product', NULL);# 1 riga modificata.

SET @iAction := LAST_INSERT_ID();# MySQL ha restituito un insieme vuoto (i.e. zero righe).

INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);# 3 righe modificate.


INSERT INTO `sys_acl_actions` VALUES (NULL, 'store browse', NULL);# 1 riga modificata.

SET @iAction := LAST_INSERT_ID();# MySQL ha restituito un insieme vuoto (i.e. zero righe).

INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);# 3 righe modificate.


INSERT INTO `sys_acl_actions` VALUES (NULL, 'store search', NULL);# 1 riga modificata.

SET @iAction := LAST_INSERT_ID();# MySQL ha restituito un insieme vuoto (i.e. zero righe).

INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelNonMember, @iAction), (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);# 3 righe modificate.


INSERT INTO `sys_acl_actions` VALUES (NULL, 'store add product', NULL);# 1 riga modificata.

SET @iAction := LAST_INSERT_ID();# MySQL ha restituito un insieme vuoto (i.e. zero righe).

INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES 
    (@iLevelStandard, @iAction), (@iLevelPromotion, @iAction);# 2 righe modificate.


INSERT INTO `sys_acl_actions` VALUES (NULL, 'store product comments delete and edit', NULL);# 1 riga modificata.

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store edit any product', NULL);# 1 riga modificata.

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store delete any product', NULL);# 1 riga modificata.

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store mark as featured', NULL);# 1 riga modificata.

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store approve product', NULL);# 1 riga modificata.

INSERT INTO `sys_acl_actions` VALUES (NULL, 'store broadcast message', NULL);# 1 riga modificata.

 

 

 

 

 

Quote · 23 Mar 2017

Then the problem isn't in Store module, it maybe it's another build-in or some 3rd-party module which affect on this functionality.  

The problem remains the same (blank page with a "checkAction() fatal error. Unknown action ID: 0" message, as wrote in top of topic).

 

Rules → http://www.boonex.com/terms
Quote · 27 Mar 2017
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.