-
Posts
250 -
Joined
-
Last visited
prestoav's Achievements
-
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!
-
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.
-
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 :-(
-
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!
-
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.
-
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!
-
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!
-
module PrivacyWire - Cookie Management & async external asset loading
prestoav replied to joshua's topic in Modules/Plugins
Is there a way to configure this module so that a 'no cookies at all' options is available? This would need to mean the wire cookies are also not loaded. Asking for a client! -
'Unrecognised path' Error at admin login and page deletion
prestoav replied to prestoav's topic in General Support
Thanks for your help @ryan. I checked the admin template and segments were not allowed (I assume this is the default as I didn't even know this section of admin existed)! I also checked my MAMP copy of eth site and that does not have segments allowed either and that's working fine. I've allowed segments on the live site (the one with the issue, see config image below) but the problem remains: I did look at the browser Network tab and only two redirects were noted (see original post). Looking further at where the issue happens, when I login to the MAMP site (that works) the page you get to is '/admin/page/?login=1'. However, on the version of the site that is live the login process directs you to '/admin/template' which, I'm guessing is where the issue is? Another thing I've noticed with further investigation is that, if I switch to the Reno or Default themes the 'Pages' menu is completely missing. It's there in UiKit but not in the others. Again, checking my local copy of the site, the Pages menu is present in all themes? -
Hi folks, PW 3.0.210 PHP 7.4.33 DB MariaDB I know others have had similar issues with this error displaying and I have worked through all proposed solutions (I think....). Here's the issue, on admin login I see this error: Looking at the network tab of browser tools I only see 2 files which are not status 200 when login has completed: I also see the issue when trying to delete pages either via the Lister (Find) or in the page specific admin (example here from Lister after the 'Trash' button is clicked in Pages > Find - note I do not have ListerPro installed). Thsi means I can no longer delete pages in admin! There are no errors in console and no errors in PW logs or the hosting's PHP log file. Finally, deleting pages via the API completes with no issues or errors. To try and diagnose the situation further I have also: 1) Installed a brand new version of the whole 'wire' folder 2) Brought in a known-working, version correct, version of the .htaccess file with only the no.9 'https' directive active. 3) Checked there is a valid 'Profile' page under Admin in the page tree and that page has the correct 'ProcessProfile' Would any of you super people out there have any other ideas I could try to correct this? Thanks in advance!
-
Hi all, PW 3.0.210 PHP 7.4.21 I'm trying to use WireUpload for the first time to upload an image to an existing multi-image field on a existing page but no image is uploaded to the temp path or the page itself. Here's my code which is based on suggestions from other posts: // Set File Extensions $fileExtensionsAllowed = ['jpeg','jpg', 'JPEG', 'JPG', 'png', 'PNG', 'gif', 'GIF']; // Set upload path $upload_path = $urls->assets . "cache/temp_image_uploads/"; $p->of(false); // New wire upload $img1 = new WireUpload('img1'); $img1->setMaxFiles(1); $img1->setOverwrite(true); $img1->setDestinationPath($upload_path); $img1->setValidExtensions($fileExtensionsAllowed); // execute upload and check for errors $imgs = $img1->execute(); // Run a count($files) test to make sure there are actually files; if so, proceed; if not, generate getErrors() if(!count($imgs)) { echo "Sorry, but you need to add a photo!"; return false; } // Run photo upload foreach($imgs as $filename) { $pathname = $upload_path . $filename; $p->product_images->add($pathname); unlink($pathname); } // Save page $p->save(); $p->of(true); $p is the page that the field is present on and $->product_images being the field the image is to be uploaded to. At this time the intention is to upload just one image file, even though the field will take multiple images. The upload directory definitely exists and when I run a print_r($_FILES) after form submission (before the code above) a file with the name attribute 'img1' is present in the $_FILES array. When this code runs the "Sorry, but you need to add a photo!" error is seen and a the $imgs variable is empty. There is nothing in the PW logs or MAMP PHP error logs reported. Does anyone have any idea what I might be doing wrong here? Thanks in advance for any pointers!
-
Hi again, Many thanks for your hints, with your help I think I have tracked down the original issue. I copied in a new version of the Procache directives tot he .htaccess file recently and that seems to be the issue. I may have copied them incorrectly so I'm not saying it's the code but reversing to an older version of the .htaccess resolved the Lister issue. The login issue 'Unrecognised path' still remains though. Thanks for your help and the hint in the .htaccess date change!
-
@BrendonKoz Thanks for you reply. I did check the logs and they were all clear. Checking the console though (I really should have thought of that...) did reveal a 404. However, the file that report as a 404 is /admin/page/lister:1 which is the page itself rather than a recourse file. Just to be sure, I have also now replaced the entire wire directory with the one from my local copy which works just fine by the issue remains. I've now found another new issue. When first logging into admin I get this error: If I then go to the page tree things go back to normal?