adrian Posted May 19 Author Share Posted May 19 @virtualgadjo - does that error happen every time you try to unpublish them all or did it only happen once like this? Is "weekendatbinnys-champagne-tasting" a field or child page name? Is ID 1019 a language page? Link to comment Share on other sites More sharing options...
virtualgadjo Posted May 19 Share Posted May 19 Hi @adrian it happens every time i tried (actually, the first time, it was my client who ran into the error and called me asking what he could have done wrong ? ) even both ways, publishing and unpublishing, after having added my custom admin action and i tried many times before and after "weekendatbinnys-champagne-tasting" is a page name name1019 the default language name of the page (website with six languages...) i've tried changing the name in english but, same result of course every child page has a different name but the name is only set in the default one (english), running select count(name1019) as dups, name1019 from pages group by name1019 having count(name1019) > 1 returns an empty result what's funny is that the website is now 5 years old and the client has already used the batch child 4 times without any alert (i've tried with the last release of your module but it didn't change anything) what was interesting to me was that once i've unpublished all the children with my action, trying to publish them back, i only worked with the hidden one, no displayed error but funny result... and it's the first time the client hid some pages during the events announcement without unpublishing them, up to this year he just unpublished the events before launching the next harvest ? have a nice day Link to comment Share on other sites More sharing options...
adrian Posted May 19 Author Share Posted May 19 I'm at a bit of a loss at the moment - I can't replicate the original error and I can't replicate any weirdness with hidden page behaving differently when publishing/unpublishing. I feel like it's due to something in here: https://github.com/adrianbj/BatchChildEditor/blob/9cdf3b7f317d9f8c07bc75faf150e5ba9490dfb6/BatchChildEditor.module.php#L1348-L1355 but not really sure why if page titles / names aren't being changed at the time you are unpublishing. Can you check to see if this section of code is being called and maybe dump the value of $name for all the child pages in the loop to see if there are indeed any duplicates at this point? 1 Link to comment Share on other sites More sharing options...
virtualgadjo Posted May 20 Share Posted May 20 Hi @adrian thanks a lot for the tip; i'll have a close look at this piece of code but right now, having a look at this name/title thing i may have an idea those page are created by the api when validating an event and each one has a different name but ha has used the same title for many events and it looks like language names, well, the default language one in fact, in changed after the page title and the creating duplicates before running the action i will try restoring the original db but unchecking the overwrte page name checkbox to see if it changes something that's where the admin custom action doesn't run into any issue as it just targets the template, no matter the names, titles or whatever else... have a nice day Link to comment Share on other sites More sharing options...
virtualgadjo Posted May 20 Share Posted May 20 Hi again @adrian, just tested it, i restored the db, unchecked this overwrite names checkbox and... it worked! it was looking at the snippet you pointed me to that i had this idea, thanks again ? ? have a nice day 1 Link to comment Share on other sites More sharing options...
adrian Posted May 20 Author Share Posted May 20 Hi @virtualgadjo - I am glad unchecking the overwrite names option solved things for you. I dug into that section of code and discovered an issue with duplicate titles (when both set during a batch update) and fixed that in the latest version. I don't think this change will help what you were seeing - I think that is something ML that I haven't been able to reproduce, but at least I found and fixed something else :) 1 Link to comment Share on other sites More sharing options...
virtualgadjo Posted May 21 Share Posted May 21 Hi @adrian i'm happy to "hear" my little post was at least useful for something ? i thought the issue i ran into was due to those pages with the same title and no names for 5 out of 6 languages but couldn't really understand where to dig more... i'll update the module in the website but you know, i'll keep my custom admin action as for the client, he won't have to wonder about all the other columns meaning and will continue to use the batch child editor he really likes to export a csv of all those pages and keep track of its events historry ? this way, whatever he does with those "pages", targeting their ids won't be impacted i'm must say those pages are a little special as i don't need a name for each language, they are pages as everything in pw but actually mode data sets i use to fill a json where to get a leaflet map markers position and popup big content and even if i create those page with a really unique name, if ever he changes their title and, why not, names afterwards even if not useful, it may generate the problem you've just fixed thanks again and a lot for your time and help (and of course modules ? ) have a nice day Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now