Spinbox Posted May 20 Share Posted May 20 I'm having problems with retrieving attributes for Variants. This hook seems to not triggering for me: $this->addHook("/find-padloper_product_attributes/", $this, 'hookFindPadloperProductAttributesOptions'); When trying to find attributes it returns a 404. I'm using multilingual fields. 1 Link to comment Share on other sites More sharing options...
kongondo Posted May 20 Share Posted May 20 (edited) Hi @Spinbox, Please confirm if your ProcessWire is running off a sub-directory. I have tested on a ML site where Dutch is the main language and English the 'other' language and the hook works fine. What language are you searching in? Maybe it doesn't matter but just want to be sure. Thanks. Edited May 20 by kongondo Link to comment Share on other sites More sharing options...
Spinbox Posted May 20 Author Share Posted May 20 Hi @kongondo, no I am not running of a sub-directory. I haven't changed anything, so I assume it uses the default language (in my case Dutch). I'm not sure it has anything to do with language. Isn't it just looking for the default language values? Link to comment Share on other sites More sharing options...
kongondo Posted May 20 Share Posted May 20 Hi @Spinbox, Thanks for the login details. You have a 5 errors that are showing during the Ajax call. These are coming from your templates and func files. I think they are interfering with the response. I'll fix this on your site and test again. Link to comment Share on other sites More sharing options...
kongondo Posted May 20 Share Posted May 20 Nope; that was not it. Still investigating. Maybe something in your ready.php hijacking the request. Link to comment Share on other sites More sharing options...
kongondo Posted May 20 Share Posted May 20 Yep. The hook is not even firing. Something else is handling the request. I'll check ready.php and similar. 1 Link to comment Share on other sites More sharing options...
kongondo Posted May 20 Share Posted May 20 Nothing wrong with ready.php I think this is what is happening: Padloper is using virtual URL hooks. It means it needs to handle the 404s in the backend for the requested URL. On your site, something is preventing this from happening meaning ProcessWire returns 404s for those virtual URLs. I don't know what that 'thing' is on your site ...yet?. 1 Link to comment Share on other sites More sharing options...
Spinbox Posted May 20 Author Share Posted May 20 Thanks for looking into it, I'm going to check what could be the problem.. Link to comment Share on other sites More sharing options...
kongondo Posted May 20 Share Posted May 20 No worries. I'll PM with details of the changes I made to your func and template files that were throwing errors. Link to comment Share on other sites More sharing options...
Spinbox Posted May 21 Author Share Posted May 21 Thank you @kongondo, You got me on the right path and I have found the issue. My homepage template has url segments enabled. Once I disable this, the url works. Not sure if this contributes to the problem but I use TemplateEngineFactory. To keep url segments I used a regex to allow anything but paths that start with find-padloper in the template settings. regex:^(?!find-padloper).*$ 1 Link to comment Share on other sites More sharing options...
kongondo Posted May 21 Share Posted May 21 Great work @Spinbox! Glad you got it sorted ?. Link to comment Share on other sites More sharing options...
kongondo Posted May 21 Share Posted May 21 @Spinbox, also check if the frontend works. Padloper uses virtual URLs in other places. E.g. to add items to the cart, downloads, etc. Link to comment Share on other sites More sharing options...
alexm Posted June 28 Share Posted June 28 Hey @kongondo and @Spinbox. Did you get the add to cart feature etc working with URL segments on on the homepage? I too have an instance, where the homepage has URL segments enabled and when enabled the padloper/add/ segments aren't processed correctly. When disabled, of course addToCart and the url segments are handled correctly. The thing is, I'd ideally like URL segments enabled as they convert LoginRegister's get url params to url segments. Link to comment Share on other sites More sharing options...
alexm Posted June 28 Share Posted June 28 I've worked around this by running LoginRegister's processes on another template, so all good for me now ?? 2 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