Jump to content
  • Fatal error: Out of memory when accessing a database


    Trying to connect to my database (https://beta.jimiwikman.se/stories/) give the following errors:
    ย 

    Fatal error: Out of memory (allocated 840609792 bytes) (tried to allocate 7968560 bytes) in /home/jimiwikm/beta.jimiwikman.se/static/templates/core_front_global.php on line 8050

    System Log:

    Error: Call to undefined method IPS\Theme\class_cms_page_page_builder::Start_Page() (0)
    #0 /home/jimiwikm/beta.jimiwikman.se/applications/cms/sources/Pages/Page.php(2071): IPS\cms\Pages\Page->getPageContent()
    #1 /home/jimiwikm/beta.jimiwikman.se/applications/cms/modules/front/pages/page.php(122): IPS\cms\Pages\Page->output()
    #2 /home/jimiwikm/beta.jimiwikman.se/applications/cms/modules/front/pages/page.php(49): IPS\cms\modules\front\pages\page->view()
    #3 /home/jimiwikm/beta.jimiwikman.se/system/Dispatcher/Controller.php(139): IPS\cms\modules\front\pages\page->manage()
    #4 /home/jimiwikm/beta.jimiwikman.se/system/Dispatcher/Dispatcher.php(169): IPS\Dispatcher\Controller->execute()
    #5 /home/jimiwikm/beta.jimiwikman.se/index.php(16): IPS\Dispatcher->run()
    #6 {main}

    Backtrace:

    #0 /home/jimiwikm/beta.jimiwikman.se/init.php(827): IPS\Log::log()
    #1 [internal function]: IPS\IPS::exceptionHandler()
    #2 {main}

    ย 


    User Feedback

    Recommended Comments

    SoloInter

    Posted (edited)

    I had the same kind of issue with memory, not exactly the same. They told me that in v4, you could drag and drop a Database widget into a header or footer. In v5, it has to be in an area named 'col1' and they have upgrade code to move the widget tree from v4 format to v5 format, but it only looked in 'col1', and on my case it was in the header.ย 

    Maybe it's the same kind of issue. Not sure. But if it is, it's already fixed in the next beta release.

    Edited by SoloInter
    Esther E.

    Posted

    Error: Call to undefined method IPS\Theme\class_cms_page_page_builder::Start_Page() (0)

    That bothers me. What's "start_page"? Looks like the page is looking for an invalid page template.

    Jimi Wikman

    Posted

    That is a custom page template.

    I think that if you before the upgrade have a custom template connected to the page where the database is added that breaks when you upgrade to V5. As we no longer manage pages the same way as we do in V4, there is no way to change that after upgrade.

    Same thing seem to happen if you delete a Page template, so there might need to be a failsafe there to either select another template, notify if you try to remove a Page Template in use, or let the user know that a template with a certain name is missing so they can recreate it?

    ย 

    Esther E.

    Posted

    1 hour ago, Jimi Wikman said:

    That is a custom page template.

    I think that if you before the upgrade have a custom template connected to the page where the database is added that breaks when you upgrade to V5. As we no longer manage pages the same way as we do in V4, there is no way to change that after upgrade.

    Same thing seem to happen if you delete a Page template, so there might need to be a failsafe there to either select another template, notify if you try to remove a Page Template in use, or let the user know that a template with a certain name is missing so they can recreate it?

    ย 

    Existing page templates should be retained with the upgrade though. Is yours still present in the ACP?

    Jimi Wikman

    Posted

    Yes, all of them are there and causing all kind of issues ๐Ÿ™‚

    Esther E.

    Posted

    You can edit the page and switch to remove the template. OR you can edit the template to make it work properly.

    When we wrote the pages upgrader, it was a conscious decision to leave everything intact as much as possible, rather than simply removing and overwriting. It's entirely possible that some templates would only need minor edits, as opposed to making the admin start from scratch.

    Jimi Wikman

    Posted

    54 minutes ago, Esther E. said:

    You can edit the page and switch to remove the template. OR you can edit the template to make it work properly.

    Actually you can't edit the page anymore as it will direct you to the database settings if it attached to a database.

    Could contain: Page, Text, File

    You can't change templates from this view, so you are stuck with it.

    56 minutes ago, Esther E. said:

    When we wrote the pages upgrader, it was a conscious decision to leave everything intact as much as possible, rather than simply removing and overwriting. It's entirely possible that some templates would only need minor edits, as opposed to making the admin start from scratch.

    If I may make a suggestion, then add new basic templates with different names because I doubt I am the only one that have toyed around with the default templates and now almost all my databases are screwed up, and I basically have to delete everything I have and start from scratch because of that.

    Might save some pain on both ends ๐Ÿ™‚

    Esther E.

    Posted

    The new pages don't use templates, there is no need for them. You just use the Page Editor and drag things wherever you want.

    1 hour ago, Jimi Wikman said:

    You can't change templates from this view, so you are stuck with it.

    I think I just have to fix this.

    Jimi Wikman

    Posted

    1 hour ago, Esther E. said:

    The new pages don't use templates, there is no need for them. You just use the Page Editor and drag things wherever you want.

    I think I just have to fix this.

    You are the magic maker @Esther E.ย ๐Ÿ™‚

    ย 

    Jimi Wikman

    Posted

    @Esther E.ย there seems to be no way to actually fix this other than deleting the database and start over. I can't find any setting that get me past this ๐Ÿ˜ž

    Jimi Wikman

    Posted

    Ok, tested with the latest beta and a fresh installation. If you just upgrade, then you are stuck with this error, but if you change the page and the database templates it works just fine.

    So, there is a way to get around it ๐Ÿ™‚


ร—
ร—
  • Create New...