At attempt disable the module I receive an error at opening of a profile of any user mysite.com/users/user

Fatal error: Call to undefined function twitter_twitter_accounts() in /home/content/71/9588871/html/sites/default/modules/views/plugins/views_plugin_argument_validate_php.inc(42) : eval()'d code on line 4

In PHPmyAdmin search (on a line twitter_twitter_accounts) has found the table ` main_views_display `
display_options_on_base

In a column ' display_options' there are such lines:

 if (!empty($uid)) {
                                    $account = user_load($uid);
                                    $twitter_accounts = twitter_twitter_accounts($account);
                                    if (count($twitter_accounts)) {
                                      return TRUE;
                                    }
                                    else {
                                      return FALSE;
                                    }

Comments

alexeyal1’s picture

StatusFileSize
new59.58 KB

error_reports_dblog

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 'FROM main_twitter twitter LIMIT 0, 5' at line 2 query: SELECT FROM main_twitter twitter LIMIT 0, 5 в файле /home/content/71/9588871/html/sites/default/modules/views/includes/view.inc в строке 810.

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 'FROM main_twitter twitter ) count_alias' at line 2 query: SELECT COUNT(*) FROM (SELECT FROM main_twitter twitter ) count_alias в файле /home/content/71/9588871/html/sites/default/modules/views/includes/view.inc в строке 805.

Invalid argument supplied for foreach() в файле /home/content/71/9588871/html/sites/default/modules/views/includes/query.inc в строке 933.

Invalid argument supplied for foreach() в файле /home/content/71/9588871/html/sites/default/modules/views/includes/query.inc в строке 908.

etc.

xurizaemon’s picture

Status: Active » Postponed (maintainer needs more info)

Looks like you have a view sitting around which references Twitter module functions.

Need more detail on how you triggered this issue. Did you remove files without disabling? Tried clearing cache?

Maybe we need to do some views cleanup on disable?

Try clearing cache or editing the view which is causing the issue.

alexeyal1’s picture

Status: Postponed (maintainer needs more info) » Active

Operated standardly.
At first on page http://site.name/admin/build/modules has cleaned a tick from the module twitter

And on page http://site.name/users/myusername has received such error:
Fatal error: Call to undefined function twitter_twitter_accounts () in/home/content/71/9588871/html/sites/default/modules/views/plugins/views_plugin_argument_validate_php.inc (42): eval () ' d code on line 4

Then I have cleared cache on page http://site.name/admin/settings/performance

The error remained.

Then I have tried to remove this module http://site.name/admin/build/modules/uninstall and have again cleared cache (just in case)

The error remained.

Then on page http://site.name/admin/build/views has removed representations:
site_tweetis The Way: user / %/tweets (created to publish all tweets)
And
tweets the Way: user / %/tweets

After that, as many have guessed, the error has left. For some reason automatically representations have not been removed. The error is eliminated. All thanks.

xurizaemon’s picture

Title: Can't uninstal module » Disable default views on disabling of module
Version: 6.x-3.0-beta9 » 6.x-3.x-dev
Status: Active » Needs work

Reproducible on 6.x - Fatal when visiting user/%/tweets which is still enabled after module disabled.

dddave’s picture

Version: 6.x-3.x-dev » 6.x-5.x-dev
Assigned: alexeyal1 » Unassigned
Status: Needs work » Postponed (maintainer needs more info)

Still relevant?

alexeyal1’s picture

---

wgoley06’s picture

I encountered this same error when I disabled the twitter module. I followed the proper steps in uninstalling the module, disabled and then updated the database. However this error continued to display when I tried to go to the "my account" page. I did discover there was a "twitter" related view enabled on my site. Once I deleted that view, updated database, and flushed the cache the error went away.

xurizaemon’s picture

Version: 6.x-5.x-dev » 7.x-5.x-dev
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs work

We should clean up views on module uninstall / removal.

damienmckenna’s picture

Status: Needs work » Active
damienmckenna’s picture

Should it go through all of the views and disable anything which uses the {twitter} table?

Leeteq’s picture

#10; yes, I think so, or at least put warning messages on all such affected views on the admin page (views overview page). I also think that when disabling the module, BEFORE it actually disables it, it would be great if that list of affected views were listed with a warning and an option to cancel the disabling, in case the admin wants to do some other adjustments first. That would be useful.

damienmckenna’s picture

How about:

  • Implement hook_disable().
  • Have it check all of the available views displays and check for any that have the Twitter tables as either a primary or joined table.
  • If any are found, disable them and post a message explaining that they were disabled.
damienmckenna’s picture

FYI I'm adding an option to disable the bundled views: #2553077: Add option to disable the bundled views

Leeteq’s picture

How about listing the affected Views first, with an option to cancel the disabling?