Please describe the issue you're having
If you accept the answer, please mark the topic as [SOLVED] by clicking the tick.

Moderators: RussH, cptr13

Forum rules: Just please remember to play nicely once you walk through the door. You can disagree with us, or any other commenters in this forum, but respect our space and keep your comments directed to the topic at hand.
By Laevantine
#1532
Interesting, I come on after a year due to the project taking off and I find an interesting glitch as it were. The Important Candidates on the dashboard returns a an error which you can view below. Funny thing is it was working not a second ago and I haven't changed anything in the code or database. In fact, when I tested the code on a separate CATS (clean install) it worked. Now here's where freaky things happen. When I reverted the clean install to default code the dashboard returned the same type of error. I checked the database and none of the fields have changed. I have not messed with any of the default coding yet the error appears. Anyone got any ideas as to why or should I resign myself to the glitch and just be prepared to reinstall CATS whenever the error pops up? Error below is based off the clean install. The red highlight is the same on both the expanded version and the clean version.

MySQL Query Failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AS submitted,
CONCAT(
candidate.first_name'
at line 52

SELECT
candidate.candidate_id AS candidateID,
candidate.is_active AS isActive,
candidate.first_name AS firstName,
candidate.middle_name AS middleName,
candidate.last_name AS lastName,
candidate.email1 AS email1,

candidate.email2 AS email2,
candidate.phone_home AS phoneHome,
candidate.phone_work AS phoneWork,
candidate.phone_cell AS phoneCell,
candidate.address AS address,
candidate.city AS city,
candidate.state AS state,
candidate.zip AS zip,
candidate.source AS source,
candidate.key_skills AS keySkills,
DATE_FORMAT(
candidate.date_available, '%Y-%m-%d'
) AS dateAvailable,
candidate.current_employer AS currentEmployer,
candidate.current_pay AS currentPay,
candidate.desired_pay AS desiredPay,
candidate.notes AS notes,
candidate.owner AS owner,
candidate.can_relocate AS canRelocate,
candidate.web_site AS webSite,
candidate.best_time_to_call AS bestTimeToCall,
candidate.is_hot AS isHot,
candidate.is_admin_hidden AS isAdminHidden,
DATE_FORMAT(
candidate.date_created, '%m-%d-%y (%h:%i %p)'
) AS dateCreated,
DATE_FORMAT(
candidate.date_modified, '%m-%d-%y (%h:%i %p)'
) AS dateModified,
COUNT(
candidate_joborder.joborder_id
) AS pipeline,
(
SELECT
COUNT(*)
FROM
candidate_joborder_status_history
WHERE
candidate_id = 0
AND
status_to = 400
AND
site_id =
) AS submitted,
CONCAT(
candidate.first_name, ' ', candidate.last_name
) AS candidateFullName,
CONCAT(
entered_by_user.first_name, ' ', entered_by_user.last_name
) AS enteredByFullName,
CONCAT(
owner_user.first_name, ' ', owner_user.last_name
) AS ownerFullName,
owner_user.email AS owner_email,
eeo_ethnic_type.type AS eeoEthnicType,
eeo_veteran_type.type AS eeoVeteranType,
candidate.eeo_disability_status AS eeoDisabilityStatus,
candidate.eeo_gender AS eeoGender,
IF (candidate.eeo_gender = 'm',
'Male',
IF (candidate.eeo_gender = 'f',
'Female',
''))
AS eeoGenderText


FROM
candidate
LEFT JOIN user AS entered_by_user
ON candidate.entered_by = entered_by_user.user_id
LEFT JOIN user AS owner_user
ON candidate.owner = owner_user.user_id
LEFT JOIN candidate_joborder
ON candidate.candidate_id = candidate_joborder.candidate_id
LEFT JOIN eeo_ethnic_type
ON eeo_ethnic_type.eeo_ethnic_type_id = candidate.eeo_ethnic_type_id
LEFT JOIN eeo_veteran_type
ON eeo_veteran_type.eeo_veteran_type_id = candidate.eeo_veteran_type_id
WHERE
candidate.candidate_id = 0
AND
candidate.site_id =
GROUP BY
candidate.candidate_id
By Laevantine
#1534
Answering my own question again... strange how that happens. If your dashboard breaks it may be due to the "activity" and "candidate_joborder" tables in your database. I found this quite by accident but for some reason I had floating, non-assigned activities in the activity table which, when deleted, cleared up my error. Seeing as I was working in a dev position this event is unlikely to happen but if your dashboard breaks check your tables and make sure there are no floating people. To check just make sure you match "candidate_id" to "data_item_id" for "activity" and just candidate_id to candidate_id for candidate_joborder. Funny how dev position warps how things work.
User avatar
By RussH
#1535
Hiya Laevantine glad you found that one, I was looking at the description of the problem and scratching my head!

PM me if there's any code changes you want to roll into the codebase and I'll invite you to the commit team.
By Laevantine
#1537
Haha, I appreciate the offer but I'm no coder. Most of what I've done has been me fumbling about do to little to no PHP, JavaScript, etc. skills. I've merely added a few custom fields and created a way to add a second status update to the candidates sql table for KPI purposes. I'll leave the inner workings to the experts. It's a miracle I've even finished the project without too much error.

This is the "import from resume"[…]

EMAIL CONFIGURATION

Hi, the email configuration (including different[…]

as the title says...

It's essential to keep these synchronized to ensur[…]