Weird common_methods.php error


Author Message
Karen

Posted: 9/2/2010
Quote message 

Hey Everyone -- this is my first time posting on ArtiSteer, but I was hoping someone could help me out with a very infuriating issue I'm having. When I am logged onto my site as the admin, everything looks normal and good, but when I log off to view the site as a unauthenticated user, every page as the following error above the portion of my pages that contains the page content:


Quote :

* warning: DOMDocument::loadXML() [domdocument.loadxml]: EntityRef: expecting ';' in Entity, line: 23 in /home/content/p/o/w/powarts/html/drupal/themes/powarts_drupal_02/common_methods.php on line 51. * warning: Invalid argument supplied for foreach() in /home/content/p/o/w/powarts/html/drupal/themes/powarts_drupal_02/common_methods.php on line 56.



I've googled around and I see that a number of other people have had this issue as well, but none of the forums/sites have a complete, detailed resolution to this issue.

I am running PHP 5 on my server and I am working with Drupal 6.x (I forget the number)

Any ideas how to resolve this issue? I've looked at the common_methods.php file and I can't see what the error is.
 
Lawrence

Posted: 9/2/2010
Quote message 

What branch of PHP are you using? Is it PHP 5.2.x or 5.3.x? Drupal has issues with the 5.3.x series, and many modules were developed to be compatible with 5.2.x.

What modules are you using? Most of the loadXML issues seem to come up due to certain modules.

Try doing a fresh install of Drupal and apply your theme to the new one, then tell us if you're still having this issue. If you are, simply reply. :-)
 
Mark C

Posted: 9/3/2010
Quote message 

I know it sounds obvious, but have you tried flushing your caches and running cron?

Or else, perhaps rename the theme in Artisteer and re-export it, upload it, and then (sometimes) the issue goes away.
 
Karen

Posted: 9/4/2010
Quote message 

Hi Lawrence and Mark,

Thank you for replying. To answer your question, as far as I know I am running PHP 5.x (I"m hosted on godaddy).

I've flushed my site's cache but I'm still experiencing this issue and, I'm sorry, but can you offer me any guidance about running cron? I'm at a loss and I'd like to try that before I uninstall and then reinstall Drupal, as my deadline for this project is coming up very soon.

I also find it very odd that this problem only appears when I'm not logged into the site. When I'm logged in as the admin, I do not see this error. Also, I have a dummy site set up on my server with the same modules installed (also hosted on godaddy) and I'm not having any issues with it. The unintsalled virtually all of the modules I had except for the core modules and some of the optional core modules.

I also put on the garland theme for a moment and the error did not appear, which makes me believe it must be the artisteer theme I am using.



 
Karen

Posted: 9/5/2010
Quote message 

Thanks again for your initial replies. I went ahead and reinstalled the theme and the problem went away and i think I know what we causing my problem -- for some reason, any edit to the template.php file caused the error I described above, even though the exact same edits did not cause an error on the dummy site. I'm not sure why changing the template.php file caused this error, but every time I returned to the original version of the file, the error disappeared so I just had to figure out how to customize certain site elements (like the login block and search block) without editing the template.php file.

So... if anyone else has a similar error in the future and has no idea why it's happening, you might want to try to upload your original template.php file and see if that corrects the error.
 
Lawrence

Posted: 9/5/2010
Quote message 

Glad you got this resolved. Here's something you may consider useful.

1. Go to yoursite.com/admin/settings/error-reporting
2. In the drop down box, click "Write errors to the log"

This will hide errors from displaying on the screen, and you'll continue to receive error messages in your watchdog admin page. Although it's not a good idea when developing your website because you'll want to see errors displaying while working on the site, it's useful in a production environment and users won't see error messages.
 
Karen

Posted: 9/5/2010
Quote message 

Hi Lawrence -- Thank you for that suggestion. I'll do as you recommend.