Jump to content
CliffG

Fatal database error

Recommended Posts

Hello. I have a website that's run PW 2.3 flawlessly since 2013. All of a sudden it threw an error that took it down. Here's the debug report:

Fatal error: Exception: 'meandthe_PWireRes.pages.parent_id' isn't in GROUP BY SELECT false AS isLoaded, pages.templates_id AS templates_id, pages.*, pages_sortfields.sortfield, (SELECT COUNT(*) FROM pages AS children WHERE children.parent_id=pages.id) AS numChildren,field_email.data AS `email__data` FROM `pages` LEFT JOIN pages_sortfields ON pages_sortfields.pages_id=pages.id LEFT JOIN field_email ON field_email.pages_id=pages.id WHERE pages.parent_id=29 AND pages.templates_id=3 AND pages.id IN(40) GROUP BY pages.id (in /chroot/home/meandthe/meandthee.org/html/wire/core/Database.php line 118) #0 /chroot/home/meandthe/meandthee.org/html/wire/core/DatabaseQuery.php(84): Database->query(Object(DatabaseQuerySelect)) #1 /chroot/home/meandthe/meandthee.org/html/wire/core/Pages.php(319): DatabaseQuery->execute() #2 /chroot/home/meandthe/meandthee.org/html/wire/core/PagesType.php(109): Pages->getById(Array, Object(Template), 29) #3 /chroot/home/meandthe/meandthee.org/html/wire/core/Users.php(60): PagesType->get(40) #4 /c in /chroot/home/meandthe/meandthee.org/html/index.php on line 214

Can anyone tell me if there's a way to recover from this and, if there is, what I need to do? I've checked and rechecked the database in phpMyAdmin; everything was OK except a warning that a PRIMARY index and a repeater index showed the same data & that I should delete one of them. I did, to no avail. (This is not to say that I know anything about databases.) All help is greatly appreciated.

Cliff

 

 

Share this post


Link to post
Share on other sites

Thank you, Adrian! A higher level of tech support managed to fix the problem after I posted, but I will take a look at the info you linked to. This is the only problem I've ever had with ProcessWire — or, I should say, MySQL.

  • Like 1

Share this post


Link to post
Share on other sites

@CliffG - I'd also suggest it might be time to upgrade to PW 3 🙂  - it's usually just a simple upgrade of the wire directory (.htaccess and index.php files). Rarely does it require anything more.

  • Like 1

Share this post


Link to post
Share on other sites

I think it may be a little more work to go from early 2x to 3, but of course you're right. I also should rewrite the CSS to use modern layout methods and take advantage of the many additions to PW since 2013! It's on my to-do list. 🙂

1 hour ago, adrian said:

@CliffG - I'd also suggest it might be time to upgrade to PW 3 🙂  - it's usually just a simple upgrade of the wire directory (.htaccess and index.php files). Rarely does it require anything more.

 

Share this post


Link to post
Share on other sites
7 hours ago, CliffG said:

I think it may be a little more work to go from early 2x to 3

I migrated a 2.3 site directly to 3.x without any problems.

Share this post


Link to post
Share on other sites

Excellent. I thought there was an intermediate step. I've upgraded 3x sites in minutes.

Share this post


Link to post
Share on other sites
4 minutes ago, CliffG said:

Excellent. I thought there was an intermediate step. I've upgraded 3x sites in minutes.

I'd still recommend backing everything up before-hand, but it should all be ok. If it's a critical website that can't have any downtime, I would also suggest making a copy and upgrading that just to check there aren't any issues, especially with third party modules.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...