mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
AOS_Products detail view does not diplay subpanels #1578
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#1578
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @boombata on GitHub (Jan 6, 2017).
Issue
added a one to many relationship to AOS_Products but the subpanel is not present in the product detail view.
Expected Behavior
Products must be able to display custom relation ship subpanel
Actual Behavior
no subpanel present
Possible Fix
edit modules/AOS_Products\metadata\subpaneldefs.php
current
line53 //'get_subpanel_data' => 'aos_products_aos_quotes_1',
line54 'get_subpanel_data' => 'function:getCustomersPurchasedProductsQuery',
modified
line53 'get_subpanel_data' => 'aos_products_aos_quotes_1',
line54 //'get_subpanel_data' => 'function:getCustomersPurchasedProductsQuery',
after this modification my custom relationships are visible, this point to be an issue with function:getCustomersPurchasedProductsQuery
Steps to Reproduce
3.no subpanel present.
Context
Your Environment
@boombata commented on GitHub (Jan 6, 2017):
located root cause of the issue:
function:getCustomersPurchasedProductsQuery in modules/AOS_Products/AOS_Products.php
failed with error:
MySQL error 1248: Every derived table must have its own alias
removing the first "SELECT * FROM(" and ")AS aos_quotes" is solving the problem and all subsections are displayed, the problem is in the sql query structure but cannot determine where.
@boombata commented on GitHub (Jan 6, 2017):
did more test, it is not a bug of suitecrm but mysql config that needed to be adjusted
so i removed it from mysqld
edited my.cnf
[mysqld]
sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
restarted mysql and now subpanels appear.
do you have recommendations on mysql settings ?
@valcosoftj commented on GitHub (Feb 8, 2018):
Can the group clause just be removed ?, so its works properly on all databases
@gerdb42 commented on GitHub (Apr 15, 2020):
Had the same issue with 7.11.12 running against MSSQL 2014. Worked around it by a) removing the outer SELECT and b) removing the GROUP BY and doing a SELECT DISTINCT. Maybe someone can find a DB independent solution.
@pgorod commented on GitHub (Apr 15, 2020):
Can you please post the specific code you used?
@gerdb42 commented on GitHub (Apr 15, 2020):
Here are my changes to modules\AOS_Products\AOS_Products.php:
@Kevconry commented on GitHub (Feb 7, 2023):
Can't replicate in 7.13.1, please re-raise or get in touch if you are still having this issue