Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make attributes implementation compatible with only_full_group_by #2538

Closed
6 tasks done
klisle opened this issue Sep 12, 2019 · 101 comments
Closed
6 tasks done

Make attributes implementation compatible with only_full_group_by #2538

klisle opened this issue Sep 12, 2019 · 101 comments
Assignees
Labels
Milestone

Comments

@klisle
Copy link

klisle commented Sep 12, 2019

Background information

IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.

Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:

  • Reporting an issue of an unmodified OSPOS installation
  • [] Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
  • Read README, WHATS_NEW, INSTALL.md and UPGRADE
  • Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
  • Read the wiki
  • Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
  • Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable

Installation information

Issue / Bug / Question / New Feature

Having this issue with the latest bin tray. I have tried with multiple 3.3.0 builds from bintray. I have also tried from a fresh install with a new database. I have deployed 3.2.0 and 3.2.3 before and had no issues. What am I missing please?
Annotation 2019-09-12 170258

@SteveIreland
Copy link
Collaborator

You should be okay with the version of PHP, MySQL, and Apache. I'm using about the same versions and it works fine.

Can you go to Office >> Configuration >> System Information and provide a screen print of what you see there? It might let you know if there is a feature that isn't properly installed

@klisle
Copy link
Author

klisle commented Sep 13, 2019

@SteveIreland Hey, here'e the copy of system info. Thanks.

OSPOS Installation Info: 3.3.0 - 8c1735
Language Code: en-US

Extensions & Modules:
» GD: Enabled ✓
» BC Math: Enabled ✓
» INTL: Enabled ✓
» OpenSSL: Enabled ✓
» MBString: Enabled ✓
» Curl: Enabled ✓

User Settings:
.Browser: Chrome
.Server Software: Apache/2.4.29 (Ubuntu)
.PHP Version: 7.2.19-0ubuntu0.18.04.2
.DB Version: 5.7.27-0ubuntu0.18.04.1
.Server Port: 80
.OS: Linux ip-172-31-95-97 4.15.0-1048-aws #50-Ubuntu SMP Wed Sep 4 22:03:52 UTC 2019 x86_64

File Permissions:
» [application/logs:] - 0777 | Writable ✓
» [public/uploads:] - 0777 | Writable ✓
» [public/uploads/item_pics:] - 0777 | Writable ✓
» [import_customers.csv:] - 0777 | Writable ✓

@mckaygerhard

This comment was marked as abuse.

@odiea
Copy link
Collaborator

odiea commented Sep 13, 2019

Works fine in Windows using Wamp server.
2019-09-13 07_03_15-Window

@SteveIreland
Copy link
Collaborator

We'll just need to wait for @mckaygerhard to enlighten us since he knows what is causing the problem experienced by @klisle

@odiea
Copy link
Collaborator

odiea commented Sep 13, 2019

I found this on the internet so permissions look ok to me.

Symbolic Notation Numeric Notation English
---------- 0000 no permissions
-rwx------ 0700 read, write, & execute only for owner
-rwxrwx--- 0770 read, write, & execute for owner and group
-rwxrwxrwx 0777 read, write, & execute for owner, group and others
---x--x--x 0111 execute
--w--w--w- 0222 write
--wx-wx-wx 0333 write & execute
-r--r--r-- 0444 read
-r-xr-xr-x 0555 read & execute
-rw-rw-rw- 0666 read & write
-rwxr----- 0740 owner can read, write, & execute; group can only read; others have no permissions

@klisle
Copy link
Author

klisle commented Sep 13, 2019

@mckaygerhard @odiea @SteveIreland I changed the permissions to 777 just for the purpose of testing what could possibly be wrong with the installation :) I know it shouldn't be for production though. I have tried also using a newly created database. The only part that is not working for me is the "New Item". creating new supplier or new customer etc all work fine.

@mckaygerhard

This comment was marked as abuse.

@odiea
Copy link
Collaborator

odiea commented Sep 13, 2019

@klisle The version number you are using appears to be 2 months old. Here is the most current unstable version. Please try it and see if anything changes for you.
https://bintray.com/jekkos/opensourcepos/download_file?file_path=opensourcepos.20190911204733.master.427432.zip

@klisle
Copy link
Author

klisle commented Sep 13, 2019

@klisle The version number you are using appears to be 2 months old. Here is the most current unstable version. Please try it and see if anything changes for you.
https://bintray.com/jekkos/opensourcepos/download_file?file_path=opensourcepos.20190911204733.master.427432.zip

I will try but as I said I tried with multiple, probably including that one, this was just the one I decided to take the screenshot from. I always try everything I can before asking for help. It is weird though.

@klisle
Copy link
Author

klisle commented Sep 13, 2019

@odiea @SteveIreland the most recent one, opensourcepos.20190911204733.master.427432.zip, has the same issue. I just extracted the zip and replaced my html folder with it. Please see the attachments for the login, new item and system info snips As I said, add supplier, add customer etc. work fine but new item does not. Thanks a lot guys.
login
newitem
sysinfo

@odiea
Copy link
Collaborator

odiea commented Sep 13, 2019

Have you created any attributes? If so see if removing them from Items changes anything

@daN4cat
Copy link
Collaborator

daN4cat commented Sep 13, 2019

If you do key F12 in Google Chrome before opening the dialog box, when you create the error do you see some errors in the debug console?

@klisle
Copy link
Author

klisle commented Sep 13, 2019

Have you created any attributes? If so see if removing them from Items changes anything

I haven't created anything except a user

If you do key F12 in Google Chrome before opening the dialog box, when you create the error do you see some errors in the debug console?

@SteveIreland @daN4cat Indeed! items/view. please see below!

ahaa

@odiea
Copy link
Collaborator

odiea commented Sep 13, 2019

My only suggestion would be to see if you have in application/views/items/form.php and check to see what permissions it has. It appears to not be there to me.

@daN4cat
Copy link
Collaborator

daN4cat commented Sep 13, 2019

@klisle please click that link with 3.85..../view and a new window should open. Take a snapshot of that please.

@klisle
Copy link
Author

klisle commented Sep 13, 2019

@klisle please click that link with 3.85..../view and a new window should open. Take a snapshot of that please.

@daN4cat http 500 error. I even changed the ownership to www-data and permissions to 777 but the issue persists

@daN4cat
Copy link
Collaborator

daN4cat commented Sep 13, 2019

Are you exposing the web server directly or behind some reverse proxy or similar?

@mckaygerhard

This comment was marked as abuse.

@klisle
Copy link
Author

klisle commented Sep 13, 2019

Are you exposing the web server directly or behind some reverse proxy or similar?

no reverse proxy. running on aws ec2

@mckaygerhard

This comment was marked as abuse.

@klisle
Copy link
Author

klisle commented Sep 16, 2019

I have tried again with a new ubuntu ec2 host, LAMP, and the issue persists, new item pop-up is blank/empty. I tested the 3.2.3 release and new item worked fine but stops working once I am using 3.3.0. As I said before the issue only occurs with new item in 3.3.0; new supplier, new customer, new employee work fine. It doesn't appear to be an htaccess issue since only new item doesn't work in 3.3.0 AND since all aspects of 3.2.3 work fine.

@mckaygerhard

This comment was marked as abuse.

@daN4cat
Copy link
Collaborator

daN4cat commented Sep 16, 2019

@klisle any way you can share an access credential to your installation to see what's wrong? I need to read what's behind that 500 Error.

@klisle
Copy link
Author

klisle commented Sep 16, 2019

@klisle any way you can share an access credential to your installation to see what's wrong? I need to read what's behind that 500 Error.

Hey @daN4cat provide me with a public key and I can make it happen.

@mckaygerhard I tested with lighttpd but had no success with the new item, its still the only thing not working :(
You said "define index.php" but I am not sure what you mean, there is already an index.php file defined in the public folder.

@klisle
Copy link
Author

klisle commented Sep 20, 2019 via email

@daN4cat
Copy link
Collaborator

daN4cat commented Sep 20, 2019

Good

@klisle
Copy link
Author

klisle commented Sep 23, 2019

@daN4cat can you generate an ssh key-pair instead? I did some reading around utilizing PGP key for ssh auth and it would require a number of changes that I would have to make and test. It would be a lot easier for you to generate a new rsa keypair and provide me with the public key to add to my ec2 instance.

@daN4cat
Copy link
Collaborator

daN4cat commented Sep 23, 2019

@klisle I need url and login credentials to your ospos to see the issue and check what error is returned. I don't plan to ssh to your ec2 instance.

@daN4cat
Copy link
Collaborator

daN4cat commented Sep 23, 2019

I thought you wanted to encrypted that info.

@daN4cat
Copy link
Collaborator

daN4cat commented Jan 3, 2020

@odiea any chance to test this with MySQL since you were able to reproduce? Thanks in advance.

@odiea
Copy link
Collaborator

odiea commented Jan 3, 2020

Did not help out here. Same error opening Item Kits or trying to open Item Modal to add or update.

ERROR - 2020-01-03 04:21:33 --> Query error: In aggregated query without GROUP BY, expression #28 of SELECT list contains nonaggregated column 'ospos3.ospos_suppliers.company_name'; this is incompatible with sql_mode=only_full_group_by - Invalid query: SELECT `ospos_items`.*, GROUP_CONCAT(attribute_value SEPARATOR '|') AS attribute_values, GROUP_CONCAT(attribute_decimal SEPARATOR '|') AS attribute_dvalues, GROUP_CONCAT(attribute_date SEPARATOR '|') AS attribute_dtvalues, `ospos_suppliers`.`company_name`
FROM `ospos_items`
LEFT JOIN `ospos_suppliers` ON `ospos_suppliers`.`person_id` = `ospos_items`.`supplier_id`
LEFT JOIN `ospos_attribute_links` ON `ospos_attribute_links`.`item_id` = `ospos_items`.`item_id`
LEFT JOIN `ospos_attribute_values` ON `ospos_attribute_links`.`attribute_id` = `ospos_attribute_values`.`attribute_id`
WHERE `ospos_items`.`item_id` = '1'
ERROR - 2020-01-03 04:21:57 --> Query error: In aggregated query without GROUP BY, expression #28 of SELECT list contains nonaggregated column 'ospos3.ospos_suppliers.company_name'; this is incompatible with sql_mode=only_full_group_by - Invalid query: SELECT `ospos_items`.*, GROUP_CONCAT(attribute_value SEPARATOR '|') AS attribute_values, GROUP_CONCAT(attribute_decimal SEPARATOR '|') AS attribute_dvalues, GROUP_CONCAT(attribute_date SEPARATOR '|') AS attribute_dtvalues, `ospos_suppliers`.`company_name`
FROM `ospos_items`
LEFT JOIN `ospos_suppliers` ON `ospos_suppliers`.`person_id` = `ospos_items`.`supplier_id`
LEFT JOIN `ospos_attribute_links` ON `ospos_attribute_links`.`item_id` = `ospos_items`.`item_id`
LEFT JOIN `ospos_attribute_values` ON `ospos_attribute_links`.`attribute_id` = `ospos_attribute_values`.`attribute_id`
WHERE `ospos_items`.`item_id` = '1'

@daN4cat
Copy link
Collaborator

daN4cat commented Jan 3, 2020

@jekkos more to fix I'm afraid....

@daN4cat daN4cat modified the milestones: 3.4.0, 3.3.2 Jan 3, 2020
@jekkos
Copy link
Member

jekkos commented Jan 3, 2020

But item overview does load?

@odiea
Copy link
Collaborator

odiea commented Jan 3, 2020

Item tables load ok.
Item_kits tables does not load.
Item add or update does not load.
Item_kits add or update appears to load properly.

@jekkos
Copy link
Member

jekkos commented Jan 3, 2020

Ok did another fix, will replace mariadb with mysql locally and will test myself.

jekkos added a commit that referenced this issue Jan 3, 2020
@jekkos
Copy link
Member

jekkos commented Jan 3, 2020

It's in a PR now, can be reviewed and tested.

@odiea
Copy link
Collaborator

odiea commented Jan 3, 2020

Works great now. Thanks

@odiea
Copy link
Collaborator

odiea commented Jan 3, 2020

It appears that it is time to cleanup the old Bintray files?

@jekkos
Copy link
Member

jekkos commented Jan 3, 2020

Ouch i hope it didn't get blocked again?

@odiea
Copy link
Collaborator

odiea commented Jan 3, 2020

It is currently still working. Just some are 5 months old.

@daN4cat
Copy link
Collaborator

daN4cat commented Jan 3, 2020

Merged latest PR

@daN4cat
Copy link
Collaborator

daN4cat commented Jan 3, 2020

This seems fixed. I close and preapare Release 3.3.2.

@daN4cat daN4cat closed this as completed Jan 3, 2020
@daN4cat
Copy link
Collaborator

daN4cat commented Jan 3, 2020

@klisle when we release 3.3.2, please migrate to that and test is again re-enabling only_full_group_by

@objecttothis
Copy link
Member

This will be fixed when #2819 gets fixed in 3.4.0. There are a couple of issues caused by Item->search() that will get resolved by removing group_concat() from that function.

@jekkos
Copy link
Member

jekkos commented Oct 30, 2020

WIll close this one, curerntly the setup works but has it's limitations. Improvements are described in #2819

@jekkos jekkos closed this as completed Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants