Jump to content

prestoav

Members
  • Posts

    263
  • Joined

  • Last visited

1 Follower

Contact Methods

  • Website URL
    http://www.prestoav.com

Profile Information

  • Gender
    Male
  • Location
    Newmarket, Suffolk, UK
  • Interests
    Consumer tech, songwriting, country & Americana music, guitars

Recent Profile Visitors

4,482 profile views

prestoav's Achievements

Sr. Member

Sr. Member (5/6)

143

Reputation

2

Community Answers

  1. Haha! Actually, I see now that the fix they suggested only works for front end pages (and that will help form submissions I guess)? However, it does not apply to admin editing and the error is still there when you first login. Ah well...
  2. I was about to post about this subject as I have the same issue when I found this chain... I found the solution posted by @psy resulted in a 500 server error for me. After a support chat with Hostinger's chat bot (presumably AI...) it seems that it is not possible to set the Database time on some Cloud / Shared hosting services - hence the 500 error. They recommend they following hook be added to ready.php to set it at page load: // Set correct Database time $wire->addHookAfter('ProcessPageView::execute', function() { $this->wire('database')->exec("SET time_zone = 'Europe/London'"); }); Now this does work. However, I raised concern that this seems to set the DB time every time a page loads and that this might unnecessarily increase processing overhead. However, they state it is not possible to set it a session level so has to be done at page load level. It seems to be running OK on an (admittedly) low traffic site. Anyone have any further thoughts on the impact of this though?
  3. Hi all, I've created a regular, single image field called 'Flag' and added it to the 'language' template ready to add a flag image for each language in order to display them as part of the language switch n the front end. Issue is - when I try to upload a regular .jpg image to the field the image seems to upload OK but then, when I save the page, the image disappears. There are no images in the /site/assets/files folder for the language page and no obvious errors in the JS console or Network console. I also noted that the image field has the 'Find Files To Translate' button added (see below)? Any ideas as to what the problem is are gratefully received!
  4. Hi folks, I've been approached but a potential client that needs a PW developer to take over and existing site. My schedule is full at the moment (very thankful for that) but I said I would try here to see if anyone was available to take it on. I'm not taking anything, just passing on details as a favour. I've had a quick look through the site so far just so I can describe it but did not develop the site myself. The main site has been built on PW and the core has been upgraded to the latest version (3.0.246). The front end uses alpine.js a fair bit and there is a Shopify integration for commerce. The eCommerce has not been launched yet. Immediate jobs appear to be: Several module upgrades need to be run, ready for... PHP version on hosting needs to be switched from 7.x to 8.x Shopify integration needs to be tested for launch soon then upgrade to meet Shopify changes later in Q2 If interested, perhaps you could either DM me on here or leave your own website URL in the chain here and I'll forward everything. Cheers for now.
  5. Hi @bernhard, This is super useful. Thank you and have a great weekend! Geoff.
  6. Hi @bernhard and thanks for taking time to answer my question. I must confess, I had not considered the 'old pages' problem but what you say does makes sense. I'm not keep on the 'double negative' approach to the field instruction as, while it solves the technical issue, it doesn't feel like good UX for the admins, at least in my application. However, the idea of a hook to set that field on page creation does seem like a way forward. Thanks again.
  7. Hi folks, Is there any way to setup a checkbox field so that is checked by default? I can't see that in the field admin and where. Thanks!
  8. OK, solved it. For some reason the admin template was setup correctly. Templates > admin > access should be set like this: Mine was set to option C which meant, as a 'guest' before logging in, I had no permission to see the admin login page and was redirected to the main root of the site. Phew!
  9. Actually, scrub that. There was a typo in what I added. Now corrected and we're back to the original result. Logging out redirects to the root page rather than the login screen.
  10. Hi @da² thanks for your thoughts. .htaccess - The .htaccess files is a direct copy of the working one on the development installation (i copied it over earlier today to be sure) so I don't think that's it. 404 in config - there wasn't one in the config file so I added the once you stated above and now on logout I get a redirect to 'mysite.com/admin/login/logout/' which throws a 'this page isn't working' error. That's new so you might be on to something? Hooks - the only hook in the ready.php is the standard one for logging sent emails and that has no redirects in it so I think we can rule that out too :-(
  11. Hi all and seasons greetings! I have a problem that's driving me a bit mad and wondered if anyone in this wonderful community can throw any light on it. I have three copies of the same site, a marketplace where registered users can add listings. The copies are localhost (on MAMP), development, and live (www). All copies are running: PW 3.0.229 PHP 8.08 All copies are also running a duplicate set of /site/ and /wire/ files. The live and development copies are running on the same server. On one copy of the site (annoyingly the live one...) I cannot access the admin login page directly. I have '/admin/' setup as the admin page. Whenever I try the url - 'www.thesite.com/admin/' it diverts to the root page of the site 'www.thesite.com'. As it's a marketplace, I can access the admin by first using the 'public' login screen for members then pasting 'www.thesite.com/admin/' into the URL bar. This redirects to www.thesite.com/admin/page as you'd expect. When I logout again the system diverts to the root page of the site rather than the admin login page. Since I can login on the user facing login page, and the logout function diverts to the root of the website rather than the admin login page, I'm thinking the issue is with the login page / login process. I'm not familiar with how this works but I have compared the /wire/Modules/Process/ProcessLogin/ folders and they look to be the same (and file sizes report the same). I should also say that all other admin functions work fine once logged in. The only difference between the three sites I can think of is the database as the live one has all the latest listings in etc. Does anyone have ideas as to what might be causing this, or could explain how the login process works? As always, any help is really appreciated!
  12. Many thanks @gebeer for this. Some of what is needed could certainly be handled by the page tree. I hadn't tough of that. However, I think I'll also look through the URL hooks idea as that might be the only way to handle some of the more complex issues.
  13. Hi folks, A lovely client of mine is looking to extend their PW site to include region or 'locale' specific content (e.g. a differently laid out home page, local product prices etc.) for certain world regions. These would be chosen by the user from a header menu and the choice retained for a sensible amount of time. The site already has languages presented using the native PW language functionality so their current URLs are in the form mysite.com/fr (using French as an example). We have discussed some different ways of handling the locales. We have ruled out out subdomains for obvious maintenance and SEO reasons. The next thought was browser cookies. However, if possible I'd like to handle the locale specific content server side if possible, rather then sending it all to the browser and using JS or similar to show the content for that locale. One question they have asked is 'can we use and additional URL segment to achieve this'? This would enable direct linking to a specific page / language / locale. For example, French speakers in Canada could use 'mysite.com/fr/ca' or 'mysite.com/ca/fr' (we don't mind what order the language / locale appear if that matters). Has anyone come across / found a solution for this type of question? If so, how did you handle it? Or, is there an alternative solution for this that I'm missing? As always, any and all suggestions / thoughts welcomed and appreciated!
  14. Hi Robin, actually this solves the issue nicely going forward. Thank you.
  15. As part of site development I somethings need to change crop sizes / settings in the codebase after the client has started to add content. This means I can end up with a lot if image variations having been created (and still being used) but with old settings. A good example might be an image variation that was created using a quality of 50 but now the code is set to 100. A new variation is not created under these situations, only if the variation size is changed. So, is there a way to purge all variations leaving the original uploaded image so new variations can be created at page runtime? I have tried the 'PageimageRemoveVariations' module (later v4 version) but that doesn't seem to remove images that are in repeater fields or RepeaterMatrix fields. I'm guessing a solution might have to work at a file level rather than field level? Any help here would be appreciated!
×
×
  • Create New...