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

User/Employees Suddenly Not Working #117

Open
StrangeWill opened this issue Aug 31, 2016 · 5 comments
Open

User/Employees Suddenly Not Working #117

StrangeWill opened this issue Aug 31, 2016 · 5 comments

Comments

@StrangeWill
Copy link

StrangeWill commented Aug 31, 2016

[1] pry(main)> ::SugarCRM.connect('[siteurl]', '[user]', '[pass]')
=> SugarCRM::Namespace0
[2] pry(main)> ::SugarCRM::User.first                    
NameError: uninitialized constant SugarCRM::User
from /usr/local/bundle/bundler/gems/sugarcrm-360060139b13/lib/sugarcrm/module_methods.rb:88:in `const_missing'

::SugarCRM.connection.get_entry("Users", 1) fails too.

So far all other modules seem to work fine. I've attempted rolling back code each release for a month, all exhibit the same issue.

Trying to hunt down why, started 6 days ago, fairly sporadic, I'm tempted to chalk this up to something SugarOnDemand is doing but figured I'd mention it here in case anyone else is experiencing issues (though it starting on a day that I had released software I had suspected a Gem conflict...).

Modules are missing from the modules list -- logged in as an admin.

@StrangeWill
Copy link
Author

StrangeWill commented Sep 1, 2016

[10] pry(main)> ::SugarCRM.session.connection.get_modules.each { |x| puts x.name } ; 0
get_available_modules: Request:
{
  "session": "[sessionid]"
}

get_available_modules: JSON Response:
{"modules"=>
  ["Home",
   "Calls",
   "Meetings",
   "Tasks",
   "Notes",
   "Reports",
   "Leads",
   "Contacts",
   "Accounts",
   "Opportunities",
   "Emails",
   "Campaigns",
   "Quotes",
   "Products",
   "Forecasts",
   "Contracts",
   "Documents",
   "Cases",
   "Project",
   "Bugs",
   "Tags",
   "KBContents",
   "ops_Backups",
   "esb_QB_Line_Items",
   "esb_QB_Transactions"]}

Something is up... and I've run out all doubt it's not a code issue at this point.

@StrangeWill
Copy link
Author

StrangeWill commented Sep 19, 2016

Known problem with 7.7.1.1:

https://web.sugarcrm.com/support/issues/357e6957-f0c0-6886-5dcc-57d85eec993c

Awaiting fix, may provide a workaround here if they don't fix it soon...

@chicks
Copy link
Owner

chicks commented Sep 19, 2016

Thanks for the update!

@StrangeWill
Copy link
Author

StrangeWill commented Oct 3, 2016

I just ended up shimming the API call here:

https://github.com/chicks/sugarcrm/blob/master/lib/sugarcrm/connection/api/get_available_modules.rb

    mods = send!(:get_available_modules, json)["modules"]
    mods += %w(Employees Users)
    modules = []

It's terrible but I think preforms as a decent shim (assuming your user isn't going to be denied these modules for any reason). Still no word on a fix from Sugar though.

@chicks
Copy link
Owner

chicks commented Oct 3, 2016

Cool - sometimes the old tricks are the best tricks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants