blueskies

Hmmm... this is very odd, because I haven't yet found out what triggers it (so I can't really raise an issue in github about it 😞 ). But it's good to hear I'm not crazy and seeing things 🤪 I've seen it once happen on the live server... suddenly there were some SiteConfig things missing from /admin/settings and when we dug into the db, we saw there were multiple SiteConfigs (and one quite "fresh" one with some blank fields). This happened after we upgraded to 4.4.4 to fix the bug listed in https://github.com/tractorcow-farm/silverstripe-fluent/issues/570. So we assumed it was possibly left over from that nasty bug.

But then yesterday, in my local dev, I was adding some more fields to the Extended SiteConfig, I dev/build, and I filled them in. Then I couldn't decided on the variable names, so I changed them a few times, dev/build a few times, and suddenly there were 3 SiteConfig entries in my local db. So I'm not entirely sure what triggers it or what is happening.... Have you narrowed down when the extra Siteconfig records are created?

Show 1 attachment(s)
baukezwaan

We are experiencing an issue with the handling of deletes in the latest version(s) of Fluent. When the latest record of for instance a Page is deleted, the deteleBaseRecord is being called.
This function deletes the record from several tables, and does this based on ID. This goes wrong for the _Localised table. There the selection should be on RecordID instead.

How to reproduce:

• fresh install of SS4 + Fluent ^4 (tested on 4.4.1 and 4.4.3) • create some Locales • add some pages, and save them in multiple languages (to make the ID higher than the RecordID in the version table) • Now; add a new page via the CMS • Remember the ID (for instance id=16) • Check which record is in SiteTree_Localised on ID=16 • Delete the page via the CMS • See record ID=16 is gone in SiteTree_Localised (instead of RecordID=16)

The snippet below fixes the issue, but probably not in the most elegant way... :face_with_head_bandage:

    protected function deleteBaseRecord(DataObject $record)
    {

        //... (collapsed)

        foreach ($queriedTables as $table) {

            if (strpos(strtolower($table), '_localised') > 0 ) {
                $delete = SQLDelete::create("\"{$table}\"", array('"RecordID"' => $record->ID));
            } else {
                $delete = SQLDelete::create("\"{$table}\"", array('"ID"' => $record->ID));
            }
Hide attachment content
blueskies

Has anyone had issues with new SiteConfig records being added? I'm suspecting Fluent is doing something odd.... I have a situation now where I have an Extended SiteConfig (with some translatable text-fields) and there are now suddenly 3 SiteConfig records in the database.... When I go to /settings in the CMS it's displaying the content for SiteConfig record #1 but the the website is using the SiteConfig record #3 (the newest one added)....

blueskies

Hi @eeerlend. I'm not sure why you chose the FluentFilteredExtension and not the plain FluentExtension? From what I see, the fitlered one only needs to apply in cases where some employees will some in some translations and another set of employees shows in another (and there can be overlap). In regards to hiding Pages from Fluent, I don't think this is possible with the fluent config settings. But perhaps it's an idea to move all the content from the pages you wish to hide to a lang.yml? This is where I place content that's not to be edited by editors through the CMS, see https://docs.silverstripe.org/en/4/developer_guides/i18n/

Show 1 attachment(s)
docs.silverstripe.org  
i18n

Developer and user documentation for the Silverstripe CMS and framework.

Hide attachment content
blueskies

Oh, that's sounding promising! Thanks! I'll have a look what's in the rc-1 and upcoming rc's and maybe start testing with it a bit over the end of the year "quiet time" 😉

blueskies

Deprecated... hmm... okay, we'll see if we can get some testing done on it. Thanks!

blueskies

I do have test but we don't have any traffic emulation or anything on it, so I'm wondering mostly if it would hold up and perform. But I suppose that's a matter of just trying it. Though it's always a little scary to be the first one trying it with high traffic 🙈

wmk

Insert regular "that's what automated tests are for" text block here...

blueskies

Just curious, but is anyone running ss 4.4 on php 7.4 in production yet? 🤪 Wondering if there's any experience out there yet before we deploy a high traffic site...