Jump to content

virtualgadjo

Members
  • Posts

    312
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by virtualgadjo

  1. sorry, hi again ? just to say, in your config file, don't forget this line $config->httpHosts = array('www.yourdomain.com'); as it's important for a lot of things, beginning with preview pages clicking on wiew buttons in the admin have a nice day
  2. Hi, just a few words to say don't forget the .htaccess file at the site root that may need to be changed - to force with or without the www - probably to force https too - and, something if nearly always do in the htaccess, to add some headers, pw default ones in the htaccess are <IfModule mod_headers.c> # prevent site from being loaded in an iframe on another site # you will need to remove this one if you want to allow external iframes Header always append X-Frame-Options SAMEORIGIN # To prevent cross site scripting (IE8+ proprietary) Header set X-XSS-Protection "1; mode=block" # Optionally (O) prevent mime-based attacks via content sniffing (IE+Chrome) # Header set X-Content-Type-Options "nosniff" </IfModule> and i often end with something like that <IfModule mod_headers.c> # prevent site from being loaded in an iframe on another site # you will need to remove this one if you want to allow external iframes Header always append X-Frame-Options SAMEORIGIN # To prevent cross site scripting (IE8+ proprietary) Header set X-XSS-Protection "1; mode=block" # Optionally (O) prevent mime-based attacks via content sniffing (IE+Chrome) Header set X-Content-Type-Options "nosniff" Header set Content-Security-Policy "frame-ancestors 'self' https://www.helloasso.com" Header set Access-Control-Allow-Origin "*" Header set Referrer-Policy "no-referrer" Header set Permissions-Policy "geolocation=(), camera=(), microphone=()" Header always set Strict-Transport-Security "max-age=31536000; includeSubdomains" </IfModule> of course, just an exemple as helloasso is just here to say i allow iframes from this url (a french asso donation website) but you may need extra iframes, some of those can be more complex depending on your website needs more infos on those curious things here https://securityheaders.com/ ? have a nice day
  3. hi, i'd like to add another "little" argument i often use to convince clients/agencies/bosses and so on, this exact forum... a client could rightly be concerned about something that happens quite often,: if ever, for any reason we had to stop working together, will another dev be able to take care of our website? of course, all the reasons i've seen here will help with yes, pw is not that hard to learn, they are other devs working with it... but, and that's my point here, a dev who is not (yet) pw addict and will start working with will find a very good and friendly place to get help, a place where beginners are never scornfully sent to go and see elsewhere with a harsh "rtfm", this could add a comfortng reason to say, ok, let's go with it ? have a nice day
  4. Hi, just in case but i'm quite sure you've already checked this... have those users this checked in their role(s) ? if yes, i'm as stuck as you are ? have a nice day
  5. 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
  6. 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
  7. 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
  8. 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
  9. Hi, here again ? i'm running into a funny little issue on a website that has a page with many children (714 so far), some of them hidden, some not, some of them already unpublished, some not, if i try to unpublish all the children i get this error -- ProcessPageEdit: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicata du champ 'weekendatbinnys-champagne-tasting-1021' pour la clef 'name1019_parent_id' -- the funny thing being that using your admin actions module, i've created my own action to unpublish all those pages (that have the same template), just adding include=all to my find protected function executeAction() { $ps = $this->wire('pages')->find('template=un_event, include=all'); foreach($ps as $p) { $p->addStatus(Page::statusUnpublished); $p->save(); } return true; } it works like a breeze ? so, actually not really a problem for me but just for you to know ? the other funny thing is if i try to "repuiblish" all of them using the batch child editor i get this error again and... it only "republishes" the pages that were hidden at the beginning of the loop (it's a real life website and the client often "plays" with the page status along the events validation) this tends to make me think it's an include thing somewhere this makes me think too that i may go a little further with this custom action to let choose the pages to unpublish/publish by their template, parent, and so on and, of course, thanks again for those modules i really like playing with ? have a nice day
  10. @Nicolas you're right and it's one of those things that makes it so great without speaking of all those crazy guys here who never stop helping while writing great addons ?
  11. Hi, honestly for this kind of thing i use one of those two modules ? https://processwire.com/search/?q=runtime&t=Modules Robin's one is a little more recent but both work fine have a nice day
  12. Hi again @adrian wow, faster than the light speed, just downloaded the last release and, yes, it works really well, thanks so much!!! and, you know, don't be confused by my response, it's just that i thought you may have something else to do than reacting that fast, i'm stunned and at the same time it's so pw like ? i should be used to it thank you very much again and have a nice day, mine is even nicer, saved some time thanks to you ?
  13. Hi @adrian thanks a lot for taking time to answer ? and don't worry, it will just be the opportunity for me to write my own little module to do this for this website specific needs and i love writing modules for pw ? have a nice day
  14. Hi, funny little problem; if i allow the users to modify the export settings and, for example just want to export the children IDs and titles, il doesn't export a csv at all but tables containing php errors --- Notice: Trying to get property 'type' of non-object in D:\wamp\www\terrapixa\epifnew\site\assets\cache\FileCompiler\site\modules\BatchChildEditor\ProcessChildrenCsvExport.module.php on line 248 Notice: Trying to get property 'type' of non-object in D:\wamp\www\terrapixa\epifnew\site\assets\cache\FileCompiler\site\modules\BatchChildEditor\ProcessChildrenCsvExport.module.php on line 254 --- same thing if i just try to add the ids to the original field list funny enough, everything works like a charm if i delele this user permission, nice csv as the output but, too bad, without the children ids ? have a nice day ---
  15. @bernhard ? great to have you here and thanks a lot, i keep this one as carefully as the former one and will try it next time i'm asked for help by a friend having lost his password ? have a nice day
  16. Hi @Boost ah yes, great to "hear" this (actually it's a @bernhard script i keep carefully in a txt file ? ) have a nice day
  17. @Boost my pleasure of course but i would have prefered it was useful ? have a nice day
  18. maybe (really maybe...) your issue comes from the mysql port in your virtualbox but if the website works it shouldn't i must say i'm a litte stuck here as using this trick quite often i never ran into that kind of problem be it online or locally
  19. @Boost funny, maybe try on top of your _main.php file just after the namespace... but this seems to show it does work what i don't really get is your url using a :8000 port being used to set virtualhosts, looks like an url sent by vs code live server...
  20. @Boost where have you put the php snippet ?
  21. @Boost sorry i misread your question... what @zoeck said ?
  22. @Boost oh yes, being an old guy, i like to see if what i do actually does something, i don't totally rely on my brain ? the important thing here is the homepage with the get var one as using the snippet in your _main ou _init only works on the front side have a nice day
  23. Hi @Boost funny, i just had to use it for a friend yesterday and, once more (he often looses his password :)) it worked fine the thing is, using this trick, first go to the domain url (not the admin login one) with the ?reset... as it works on the frontend of course and as you can see it doesn't use any user name or email to do the trick, only the user id to check if it does something you may try having the "field_pass" table opened, refreshing it after you've gone to the homepage with the reset get var to see if it worked or at least did something have a nice day
  24. hi, no ? this one only resets the password (i think it's @bernhard who gave it) first, put this in you _init.php file or on top of your _main.php if($input->get->resetpassword == 1) { $admin = $users->get(41); $admin->setAndSave('pass', 'yournewpassword'); die("admin url = {$pages->get(2)->httpUrl}, admin username = {$admin->name}"); } then go to http://www.yoursite.com/?resetpassword=1 and, of course, immediatly remove this code from your template, goes without saying... it only uses and targets the first admin user (id 41) whichever login you're using have a nice day
  25. Hi @Mats i had been fighting for a while with this too and ended wrting my own solution to keep some hair on my head ? and my pleasure of course have a nice day
×
×
  • Create New...