Frank Vèssia Posted September 20, 2023 Share Posted September 20, 2023 Hello, I have a template with 32 fields, one repeater and images and I added a function to clone a page via API. It worked since today when suddenly is throwing an sql error, never seen before: Error: Exception: SQLSTATE[HY000]: General error: 1116 Too many tables; MariaDB can only use 61 tables in a join and from now on, the clone function doens't work anymore. Any idea? Thsi si my clone function function clonePlate($plate){ $pages = wire('pages'); $copy = $pages->clone($plate); $copy->setAndSave('title', $copy->title.' (copy)'); } Link to comment Share on other sites More sharing options...
BitPoet Posted September 20, 2023 Share Posted September 20, 2023 Do you have autojoin enabled for all/many fields on that template? Link to comment Share on other sites More sharing options...
Frank Vèssia Posted September 20, 2023 Author Share Posted September 20, 2023 no, just the title, which is by default. Link to comment Share on other sites More sharing options...
Frank Vèssia Posted September 20, 2023 Author Share Posted September 20, 2023 After some debug it looks like the image field is the problem, cloning the page without any image assigned works as expected, very strange Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now