Too Many Values Of Repeater Give Max Execution Error When Saving
I am working on a project in octoberCMS(learner/beginner) where i have a tab with a repeater having around 100 values. So whenever i try to save the product i get maximum execution time
.
I know it can fixed by increasing the max execution time but i'm looking for permanent fix and not a hack where I don't have to change system configs. I tried to implement Pagination
. It took about a whole day to implement pagination and later I figured it saves the values as json and will only save the part of the active pagination page. So I'm looking for suggestions that can be implemented without any hacks and feels right. Please check the attachment.
Is there anyway we can display just the repeater in different url linking with the same product?
Answer
You could create a custom page that only had the repeater fields on it, but eventually you still are going to hit your maximum execution time on that page as well. I doubt it'll drop the amount of processing enough for it to make much of a difference on how many repeater fields you can add.
I'm not sure why you think increasing max execution time is a hack- it is a totally valid way to allow longer running processes to finish. It appears you are using MAMP on your local machine based on the screenshot, your local machine might not be the best gauge for how your application will perform on a real web server.
All that being said though- 90 fields is a lot for a repeater, it typically is used in cases where you don't have a ton of data and you want to keep it tied to the database record. For the amount of records you're describing, I think a much better solution that "feels right" would be to use relationships.
Probably you want a One to Many relationship. I would read through that section and then read through Backend Relations. This will give you pagination, the ability to search, easier access to the data from the code, etc. all for free and is usually a better solution than repeaters.
Hope that helps.
Related Questions
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page