A giants wall of errors flashes up when I try to run the cron, and always seems to be the same:

warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 83: parser error : Entity 'rsquo' not defined in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: If you’ve been using Twitter from your phone, warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 83: parser error : Entity 'rsquo' not defined in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: witter from your phone, click here and we’ in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 136: parser error : Entity 'nbsp' not defined in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Select Language ...  in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 159: parser error : Entity 'copy' not defined in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]:

  • © 2009 Twitter
  • in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.
    warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/archite4/public_html/cms/sites/all/modules/twitter/twitter.inc on line 438.

    It seems like the XML parser is reading a webpage? I checked www.twitter.com/account/complete (which is in there somwhere) and can't figure out why it would be trying to read it. I thought maybe I had to attach a mobile device the the new account, so I did, and it still doesn't work, except that now I can type in my phone number on that page it's reading and it opens my account without a password... somewhat tangential, but just in case it's relevant... I'm in Canada. Just throwin it out there :)

    Any suggestions would be appreciated!

    Comments

    patcon’s picture

    Figured it out -- For some reason there was a blank dummy account that was present when I first installed, and it was causing errors. Just erased and that was that!

    FlymastaFlex’s picture

    I have the same problem... what did you erase where exactly ?

    eaton’s picture

    Removing the account and re-adding it should(?) fix this. The problem occurs when an HTML response is sent back rather than an XML response; I'll take another pass through and ensure that we're checking for proper status codes before parsing the response as XML.

    timmillwood’s picture

    I am getting the error SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: ^ in /var/www/drupal/sites/all/modules/twitter/twitter.inc on line 438. in my log, I have 100's of users so can't really ask them all to re add their details.

    Any ideas on a solution?
    Could the module check the account works before it fetches data?

    abraham’s picture

    Priority: Normal » Critical

    Some API calls are being made with the twitter username instead of using the twitter user id. One of my users had their email instead of twitter username and emails can not be used in show methods.

    example that fails:

    http://twitter.com/statuses/user_timeline/email@fails.net.xml
    

    example that works:

    http://twitter.com/statuses/user_timeline.xml?id=9436992
    

    There are several calls that do this. I'll try to work on a patch to fix this in the next couple of days.

    captspcbnt2’s picture

    I ran into this same problem today. Found the 'dummy' account, which was a blank line above my admin account's twitter account (easy to miss - it appears right above the twitter account that I added for my personal account, which just so happens to be the admin account on my site). Deleted that blank account and re-ran the cron and it worked just fine. Thanks for the help!

    pribeh’s picture

    Fixed yet? I'm getting this issue and I can't find the user who's done this.

    plan9’s picture

    Subscribing: I have no 'dummy accounts' yet still have these errors which kill cron.

    sterndata’s picture

    YOu get this in the 6-x-2 series if the global account is not set. It seems to fail over to the failover url, set to "twitter.com". If the global account is not set, it should not attempt to retrieve anything using it.

    sterndata’s picture

    So much for yesterday's post. It's broken again today on my system.

    At line 486 in twitter.inc, here's the content of $data:

    http://s.twimg.com/a/1250203207/images/themes/theme1/bg.gif false 12
    false
    false
    false


    pribeh’s picture

    I'm getting it on line 477.

    kingyann’s picture

    Had the exact same issue. Unchecking the option "Import Twitter Statuses", running cron, checking the option back did the trick

    kjholla’s picture

    Am getting a similar error.

    Everytime the Cron runs, my error log reads:

    Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/mysite/public_html/sites/all/modules/twitter/twitter.inc:477 Stack trace: #0 /home/mysite/public_html/sites/all/modules/twitter/twitter.inc(477): SimpleXMLElement->__construct('<!DOCTYPE html ...') #1 /home/mysite/public_html/sites/all/modules/twitter/twitter.inc(101): _twitter_convert_xml_to_array('<!DOCTYPE html ...') #2 /home/mysite/public_html/sites/all/modules/twitter/twitter.module(185): twitter_fetch_timeline('mytwitterusername') #3 /home/mysite/public_html/includes/module.inc(471): twitter_cron() #4 /home/mysite/public_html/includes/common.inc(2661): module_invoke_all() #5 /home/mysite/public_html/modules/system/system.admin.inc(1715): drupal_cron_run() #6 /home/mysite/public_html/includes/menu.inc(348): system_run_cron('twitter_cron', Array) #7 /home/mysite/public_html/index.php(18): menu_execute_active_handler() #8 {main} thrown in /home/mysite/public_html/sites/all/modules/twitter/twitter.inc on line 477

    I only have one twitter user setup at a user level and no global username setup.

    Regards,
    KH

    refreshingapathy’s picture

    Subscribing... having the same issue as mentioned above, errors at line 477.

    pribeh’s picture

    Still happening even if I set the global account correctly. I have hundreds of users and can't seek out a single incorrectly entered Twitter account name. Any other way around this?

    funana’s picture

    Status: Active » Closed (duplicate)