[SOLVED] auto actions question about triggers

11 years 6 months ago - 11 years 6 months ago #213149 by ThePiston
Replied by ThePiston on topic Re: auto actions question about triggers
I did as you said and got this error:

500 - JDatabaseMySQL::query: 1054 - Unknown column 'onlinestatus' in 'field list' SQL=SELECT onlinestatus FROM jos_comprofiler WHERE id=250


the 250 is the ID of the user I was updating

coincidentally i also got this on another plugin earlier today:

Notice: Undefined property: moscomprofilerUser::$onlinestatus in /home/site/public_html/components/com_comprofiler/plugin/user/plug_cbprofilenotifier/cb.profile_notifier.php on line 116


CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

11 years 6 months ago #213154 by krileon
Replied by krileon on topic Re: auto actions question about triggers
The fatal query error would stop it from working. I've no idea where it's coming from though (another auto action maybe?); is there a callstack under it pointing where it's coming from? The notice from profile updater wouldn't hurt it though. You can try placing CB Auto Actions as the first plugin in CB > Plugin Management to force it to fire before everything else, but is no guarantee that'd workaround the fatal error.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 6 months ago #213158 by ThePiston
Replied by ThePiston on topic Re: auto actions question about triggers
I disabled a plugin that notifies admins when someone changes their email (profile notifier v2.1). Disabling that caused a 301 error and not a 500.

I tried disabling all non-essential plugins and still got the 301 error. The only way around it was to disable the auto actions plugin.

Here's the stack from the 500 error:

Call stack
# Function Location
1 JSite->dispatch() /home/site/public_html/index.php:68
2 JComponentHelper->renderComponent() /home/site/public_html/includes/application.php:124
3 require_once() /home/site/public_html/libraries/joomla/application/component/helper.php:162
4 userSave() /home/site/public_html/components/com_comprofiler/comprofiler.php:98
5 moscomprofilerUser->saveSafely() /home/site/public_html/components/com_comprofiler/comprofiler.php:477
6 cbPluginHandler->trigger() /home/site/public_html/administrator/components/com_comprofiler/library/cb/cb.tables.php:1598
7 cbPluginHandler->call() /home/site/public_html/administrator/components/com_comprofiler/plugin.class.php:541
8 call_user_func_array() /home/site/public_html/administrator/components/com_comprofiler/plugin.class.php:583
9 getProfileNotifyTab->beforeUserUpdate()
10 getProfileNotifyTab->sendNotification() /home/site/public_html/components/com_comprofiler/plugin/user/plug_cbprofilenotifier/cb.profile_notifier.php:262
11 JDatabaseMySQL->loadResult() /home/site/public_html/components/com_comprofiler/plugin/user/plug_cbprofilenotifier/cb.profile_notifier.php:122
12 JDatabaseMySQL->query() /home/site/public_html/libraries/joomla/database/database/mysql.php:355
13 JError->raiseError() /home/site/public_html/libraries/joomla/database/database/mysql.php:231
14 JError->raise() /home/site/public_html/libraries/joomla/error/error.php:171
15 JException->__construct() /home/site/public_html/libraries/joomla/error/error.php:136


CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

11 years 6 months ago #213167 by ThePiston
Replied by ThePiston on topic Re: auto actions question about triggers
FYI: I have a simple field AA that works great - it's the Request AA that causes the error. Am I using the Request area properly? should I be putting "GET: user_id = [user_id"?

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

11 years 6 months ago - 11 years 6 months ago #213174 by ThePiston
Replied by ThePiston on topic Re: auto actions question about triggers
I've isolated the issue. The user_id is not being sent to the php page. This is what I have in my php file's query:
<?php
include ("inc/common.php");

$user = "$_GET[user_id]"; //getting the user_id from URL

$query = "
SELECT 
	a.id
	,a.$plat
	,a.$plong

FROM 
	`$cbtable` a
WHERE 
	$searchfield =  'Yes' and a.id = $user 
";
$rs = mysql_query ( $query );
...

This code works since I can call the php manually with ?user_id=250 suffix and then it works fine. If you look at the image of my settings, what am I doing wrong in the "Request" area? I need to send the user_id in that URL. thanks

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

11 years 6 months ago - 11 years 6 months ago #213175 by ThePiston
Replied by ThePiston on topic Re: auto actions question about triggers
got it - I should have been using POST and not GET.

one thing though - exact same settings work fine in J2.5 but 500 error with the online status in J1.5. I get the 500 error even if I have no actions published as well as only the default template, CB core, and CB menu published.

Has this version been tested on J1.5?

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.220 seconds

Facebook Twitter LinkedIn