Author Topic: Content pages can disappear  (Read 3598 times)

Offline junkyard

  • Full Member
  • ***
  • Posts: 127
  • Karma: +24/-0
    • View Profile
Content pages can disappear
« on: January 17, 2014, 02:23:35 PM »
There is a little scary bug in 1.1.6 (maybe 1.1.7 too?) related to saving Design/Content pages  ( SQL tables 'contents' and 'content_descriptions').
It happens this way.  Sometimes, when updating existing pages contents, occasionally you may have a field error related to certain field's validators like:
  Required Data has not been entered. Check for field errors!
  Content Title must be between 2 and 64 characters!
  Content must be more than 1 characters!
  etc..

So, you follow the instruction and modify the Title (or the Content, etc) properly and hit on Save... and after it says something like "Success: You have modified a page!", what you see is Content Manager blank, cause the page you were editing just disappeared from both Admin and Store altogether!

You start checking db and discover, the page is still present in the 'content_descriptions' and 'pages' and 'page_descriptions' tables, but  was wiped out from the 'contents'. You can insert into 'contents' values manually in mysql and you will be able to see the page but the bug is still there, and intermittently hampers editing pages deleting them  from 'contents' :(

Basically, when any error (be it the 64 characters Title limit; or Content > 1 character; or any other error like the Allowed memory size from http://forum.abantecart.com/index.php/topic,1285.0.html ) occurs, it somehow interrupts the page editing process in the Content Manager, drops the reference to 'contents' table stored in the memory, and after pressing on Save to the bottom it is gone.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4266
  • Karma: +282/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Content pages can disappear
« Reply #1 on: January 17, 2014, 04:58:25 PM »
Content section was updated on 1.1.8. There is a big possibility that this issue is fixed.
If you can try it and see if you can get the same problem, would be awesome.

https://github.com/abantecart/abantecart-src/archive/1.1.8.zip
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline junkyard

  • Full Member
  • ***
  • Posts: 127
  • Karma: +24/-0
    • View Profile
Re: Content pages can disappear
« Reply #2 on: January 18, 2014, 12:28:45 PM »
Thanks for the sources!  We've checked the Content Manager files like
  core/lib/content_manager.php
  admin/controller/pages/design/content.php
and seeing a lot of changes indeed, but replacing these two files only appears potentially unsafe for trying over existing online content.
Since we are not yet ready for full 6->8 upgrade at this time, we'll wait till it can be arranged on our side after 1.1.8 release.
Will surely let you know if it gets fixed by that version.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4266
  • Karma: +282/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Content pages can disappear
« Reply #3 on: January 18, 2014, 02:01:41 PM »
Well, it would helpful if we know ahead of time, before release. We still have time to fix the issue.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline junkyard

  • Full Member
  • ***
  • Posts: 127
  • Karma: +24/-0
    • View Profile
Re: Content pages can disappear
« Reply #4 on: January 18, 2014, 03:04:38 PM »
Yeah, if only there was a way to update the Content Manager only.. We've got some customisations and cannot upgrade the system before we are ready.
Additionally, we used to carry out upgrades via the cart's Update Manager in the admin panel to track any possible errors,  as this is highly sensitive process!
Anyway, here's how the issue can be repeated easily on any abantecart installation:

1. Create any quick content page as usual, title and some content, save it.
2. Modify page's Title to be 65 characters, and attempt to save it with the "Save" button at the bottom of the page, to generate warning:
  Content Title must be between 2 and 64 characters!
It is important to use that specific button at bottom because the JQGrid's button near the Title would skip validator and save it ok regardless.
3. After you saw the red warning, correct the Title back to <=64 chars to comply, and once again press the "Save" at the bottom.
You should now have the page disappeared.

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: Content pages can disappear
« Reply #5 on: January 18, 2014, 09:54:47 PM »
Thank you for steps to replicate.

See this fix in 1.1.8
You can copy these file now or wait for an update.
https://github.com/abantecart/abantecart-src/commit/4350cf327c86748aa242b1ea1ece74e298aae6f0
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline junkyard

  • Full Member
  • ***
  • Posts: 127
  • Karma: +24/-0
    • View Profile
Re: Content pages can disappear
« Reply #6 on: January 18, 2014, 10:59:16 PM »
Thanks a ton!!   We've integrated the change into our  admin/controller/pages/design/content.php  and it works great!

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4266
  • Karma: +282/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Content pages can disappear
« Reply #7 on: January 19, 2014, 11:52:15 AM »
Glad I can help  :P
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod