herr rilke Posted Sunday at 09:51 AM Share Posted Sunday at 09:51 AM thanks @bernhardย for this module! it makes my code so much more organized & the content easier to maintain. but i am not able to setup an ajax endpoint: i get a 404 error in return. file lives in /site/templates/ajax/ i am logged in as a superuser. URL has no trailing slash. also the modules settings says: "No endpoints found." what am i doing wrong? PW 3.0.240, RockFrontend 3.21.2, RockPageBuilder 5.8.0 ย ย 1 Link to comment Share on other sites More sharing options...
bernhard Posted Sunday at 10:35 AM Author Share Posted Sunday at 10:35 AM 42 minutes ago, herr rilke said: thanks @bernhardย for this module! it makes my code so much more organized & the content easier to maintain. Great to hear that! 42 minutes ago, herr rilke said: what am i doing wrong? I can't know if you don't share the exact steps you did. I don't know which file you created. I don't know which url you entered... Maybe it's just a typo! Link to comment Share on other sites More sharing options...
herr rilke Posted Sunday at 12:00 PM Share Posted Sunday at 12:00 PM hello bernhard, Thank you for your quick response. I found out that the whole thing doesn't work on my local Windows development computer - but it does on my Linux web server. could this be related to file permissions? It's just a "copied version" - copied from Windows to the live server. What would be a starting point? Link to comment Share on other sites More sharing options...
bernhard Posted Sunday at 01:56 PM Author Share Posted Sunday at 01:56 PM That's a good hint! So maybe we are just missing a normalisation for the path separator somewhere. Can you place bd($rockfrontend) in site/ready.php and tell me the output for ajaxEndpoints? Link to comment Share on other sites More sharing options...
herr rilke Posted Monday at 08:06 AM Share Posted Monday at 08:06 AM good morning @bernhard! this ist bd($rockfrontend) in site/ready.php debug info: ProcessWire\RockFrontend folders: array 0 => 'C:/wamp64/www/qualiguide/site/templates/' 1 => 'C:/wamp64/www/qualiguide/site/assets/' 2 => 'C:/wamp64/www/qualiguide/' liveReload: RockFrontend\LiveReload interval: 1 includeDefaults: array 0 => 'C:/wamp64/www/qualiguide/site/' 1 => 'C:/wamp64/www/qualiguide/RockShell/docs' 2 => 'C:/wamp64/www/qualiguide/RockShell/App' include: array (0) excludeDefaults: array exclude: array (0) autoloadStyles: ProcessWire\WireArray count: 1 items: array 'StylesArray:0' => RockFrontend\StylesArray #447 โฆ autoloadScripts: ProcessWire\WireArray count: 1 items: array 'ScriptsArray:0' => RockFrontend\ScriptsArray #453 โฆ ajaxEndpoints: array (0) Full Object: ProcessWire\RockFrontend addMarkup: null ajax: false ajaxFolders: array '/ajax/' => '/C:/wamp64/www/qualiguide/site/templates/ajax/' alfredCache: ProcessWire\WireData autoloadScripts: ProcessWire\WireArray autoloadStyles: ProcessWire\WireArray contenttype: 'text/html' createManifest: false folders: ProcessWire\WireArray home: ProcessWire\HomePage hasAlfred: false isLiveReload: false js: array (0) langMaps: null latte: null latteWithLayout: null layoutFile: '_main.latte' layoutFolders: ProcessWire\WireArray liveReload: RockFrontend\LiveReload manifest: null noAssets: false noLayoutFile: '' onceKeys: array (0) path: 'C:/wamp64/www/qualiguide/site/modules/RockFrontend/' postCSS: ProcessWire\WireData remBase: 16 scripts: ProcessWire\WireData seo: null sitemapCallback: Closure($page) file: 'C:\wamp64\www\qualiguide\site\modules\RockFrontend\RockFrontend.module.php:2741' sitemapOptions: array (0) styles: ProcessWire\WireData translations: array (0) viewfolders: array (0) data: array useFuel: true _instanceNum: 144 localHooks: array (0) _wireHooks: ProcessWire\WireHooks trackChanges: 0 changes: array (0) _notices: array 'errors' => null 'warnings' => null 'messages' => null _wire: ProcessWire\ProcessWire status: 4 statusNames: array debug: true fuel: ProcessWire\Fuel data: array (35) โฆ lock: array (20) โฆ requiredInterfaces: array (1) โฆ pathSave: 'C:\wamp64\www\qualiguide' fileSave: 'C:/wamp64/www/qualiguide/site/ready.php' updater: unset instanceID: 0 shutdown: ProcessWire\WireShutdown useFuel: true _instanceNum: 6 localHooks: array (0) ย Link to comment Share on other sites More sharing options...
bernhard Posted Monday at 08:53 AM Author Share Posted Monday at 08:53 AM Thx, could you please try v3.22.2 ? Link to comment Share on other sites More sharing options...
herr rilke Posted Monday at 12:37 PM Share Posted Monday at 12:37 PM thank you! unfortunately the result is still the same ๐ do you need another dump from tracy? Link to comment Share on other sites More sharing options...
bernhard Posted Monday at 12:53 PM Author Share Posted Monday at 12:53 PM @dotneticย as you are on Windows could you please have a look? I can't debug this on Mac... Link to comment Share on other sites More sharing options...
bernhard Posted Monday at 03:57 PM Author Share Posted Monday at 03:57 PM Hey @herr rilkeย there was an issue with the ajax feature both on windows installations and on subfolder installations. I think they should be fixed now! Please check out v3.23 PS: Thx for your help with the windows path issue @dotnetic, the final fix was a little bit more complicated though ๐ ย https://github.com/baumrock/RockFrontend/commit/0cf84be630050d212b334e52477d97039823de4f https://github.com/baumrock/RockFrontend/commit/c9fbd2430e166d304cae9af943510cb8a391bcdf 1 Link to comment Share on other sites More sharing options...
herr rilke Posted Monday at 04:18 PM Share Posted Monday at 04:18 PM wow, how great! thanks so much in advance! But I can't yet see the update and import it directly via processwire. Link to comment Share on other sites More sharing options...
bernhard Posted Monday at 04:20 PM Author Share Posted Monday at 04:20 PM Just download it from github and remove /site/modules/RockFrontend and then add the new files thereย https://github.com/baumrock/RockFrontend/archive/refs/heads/main.zipย orย https://github.com/baumrock/RockFrontend/releases I've found an issue on my project but let me know if the new version works for you nonetheless. Please use v3.23.1 ! Link to comment Share on other sites More sharing options...
herr rilke Posted Monday at 04:46 PM Share Posted Monday at 04:46 PM allright! i have v3.23.1 and now it shows "/ajax/foo" in module's ajax-settings, but "forbidden" when following that link ย Link to comment Share on other sites More sharing options...
dotnetic Posted Monday at 04:50 PM Share Posted Monday at 04:50 PM @herr rilkeย Try to call the path directly instead of clicking the link. http://localhost/path-to-processwire-site/ajax/foo Link to comment Share on other sites More sharing options...
bernhard Posted Monday at 04:57 PM Author Share Posted Monday at 04:57 PM @herr rilkeย please provide step by step instructions what you did. Provide every file name you created, every file content you put into it, every url you put into your browser. Every important detail about the pw installation (eg is it in a subfolder or not)... @dotnetic just confirmed that it works for him on windows + in subfolder installation 1 Link to comment Share on other sites More sharing options...
herr rilke Posted Monday at 05:03 PM Share Posted Monday at 05:03 PM #@!^$ problem was on my side (forgot that i put it here, yesterday) : <?php // Prรผfen, ob der Aufruf per AJAX erfolgt if (!$config->ajax) { http_response_code(403); echo "Forbidden"; exit; } // Beispielantwort echo "Dies ist die Antwort von /ajax/foo"; after deleting the first part, everything works just fine! thank you guys for your support! ย 2 Link to comment Share on other sites More sharing options...
bernhard Posted Monday at 05:05 PM Author Share Posted Monday at 05:05 PM Great! Have fun ๐ย 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