lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

3.1.6 does not fix Custom Pages in Admin #616

Closed jorisw closed 9 years ago

jorisw commented 10 years ago

After going from 3.0.7 to 3.1.5, the content of Custom Pages in the Admin panel show up empty in the textarea where content can be edited. No change if I switch to source code mode using the button right above the textarea.

The 3.1.6 release notes say this bug is fixed, however after updating to 3.1.6, the textareas are still empty. The custom pages do show correctly still, on the web store itself.

brandinchiu commented 10 years ago

Are you working from a fresh, empty, database? Or from a 2.x.x database upgrade? I've only been able to reproduce this problem from upgraded databases.

jorisw commented 10 years ago

The web store indeed ran on 2.x for years. But it ran 3.0.7 for months until recently, and it runs 3.1.6 now. The problem popped up after going from 3.0.7 to 3.1.5.

brandinchiu commented 10 years ago

Hmm. My issue came up right after upgrading to 3.x.x from 2.x.x. I had to delete them all from the database and start over. It would be great to have a fix. On May 25, 2014 4:29 PM, "Joris Witteman" notifications@github.com wrote:

The web store indeed once ran on 2.x for years. But it ran 3.0.7 for months until recently, and it runs 3.1.6 now. The problem popped up after going from 3.0.7 to 3.1.5.

— Reply to this email directly or view it on GitHubhttps://github.com/lightspeedretail/webstore/issues/616#issuecomment-44144678 .

echantigny commented 10 years ago

Well, they just closed my issue where I was telling them that after upgrades, my French content was disappearing from the text boxes (and also from the site). They said it was an isolated issue and no one else had this problem. I guess this is related and my database comes from an upgrade from version 2 also.

jorisw commented 10 years ago

If this helps: The content of the div.redactor_editor, in the page source, shows only:

<p></p>

... instead of the actual content.

ktwbc commented 10 years ago

@echantigny Do you have the support ticket number? I'd like to reference it.

In general, the overriding issue is that 2.x databases had no real data integrity checking and 3.x has a lot. The transition between the two can sometimes be problematic in trying to "clean" data during the install process. In many cases, it's simpler to go back and fix missed items (in the case of a 3 install, part of the reason why we create a new db and leave the v2 intact so in cases like this, we can help extract data. All your text is in xlsws_custom_pages in the original database so it could be repasted into Admin Panel and saved where it should now be proper).

echantigny commented 10 years ago

This is the issue where you told me it was an isolated issue: https://github.com/lightspeedretail/webstore/issues/613

I did repaste it, when I upgraded to .5 and to .6 . I don't want to have to repaste it each time I upgrade.

jorisw commented 10 years ago

Sad to report that while initially I was able to re-paste the previous database content into the Admin/Custom Pages and save, that upon visiting that section again in the Admin, the textareas still show up empty. 3.1.7 doesn't fix this either.

The impact of this is that my clients are not able to update vital portions of their home page content. Looking forward to seeing a fix for this.

If it helps, I did notice that after I hit Save in the Custom Pages section, the content of the database field changed to a serialized PHP object rather than a literal string. Perhaps you could just detect the type and update it on the fly if need be.

ktwbc commented 10 years ago

Hi, Are you creating a new page and pasting in, or pasting into an existing page? We have an outstanding bug WS-1936 Custom Page content is not saved when creating a new page, which is when creating a new Custom Page, any text in the textarea box is not saved but once the page is created (say by leaving textarea blank and just filling out the rest, click Save), then you can paste in the body and click Save again. Updating an existing page should work.

If that's not your scenario, if you're pasting into an existing page and it's still getting lost, let's look at the text you're pasting in because maybe it's specific to what you're doing and the parsing isn't correct or there's code that's causing a problem.

If the text is saving as serialized strings in xlsws_custom_page then further reads should work with it just fine. CustomPage.php function afterFind() just loads and parses the string with a _xls_parse_language_serialized() function so it should be straightforward. When you save the text, are you seeing it actually in db?

echantigny commented 10 years ago

I can't be 100% sure, but here's what I think I did:

When I upgraded my 3.x version to 3.y, the translations disappeared in the admin panel.

Readded the content in the 3.y version but lost it again in 3.z

I think I went from 3.1.4 to 3.1.5 to 3.1.6.

jorisw commented 10 years ago

Any progress on this? In case it helps, here's our System Information:

Web Store Version 3.1.7  
Build webstore-2014-06-05-1937  
Database Schema 447  
PHP Version 5.3.27
jorisw commented 10 years ago

Is there any plan to fix this?

gabeguz commented 9 years ago

Hi @jorisw. Apologies for the delay, we have a bug for this in our internal ticketing system: WS-1936 and are working on a fix.

gabeguz commented 9 years ago

This has been fixed in the 3.2.2 release.