Jump to content

Stefanowitsch

Members
  • Posts

    344
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Stefanowitsch

  1. @nbcommunication I recently updated on my site to make use of the new module version and it worked fine. Suddenly the feed is no longer displaying anything and I am getting this error message in the log files: Could not process user media: {"error":{"message":"Error validating access token: Session has expired on Saturday, 14-Dec-24 01:23:54 PST. The current time is Tuesday, 17-Dec-24 07:50:40 PST.","type":"OAuthException","code":190,"fbtrace_id":"ALq9x9hasK45lecwrhHmaep"}} I never faced this error before. I tried re-authorizing the account, generated a new token and placed it into the module settings but I keep getting this error message. EDIT: After a short period of time (i just checked again) the feed is working again. I don't know if re-authorizing was the solution but it seems that it worked in the end 🙂
  2. Hi @nbcommunication, I have a question about rendering the description text of an instagram post. Right now i am printing out the text via the description property like this: <?= $item->description ?> Unfortunately the text formatting gets lost. Here is what the post looks like on instagram: And this it how it looks like on my website: I understand that this is what the Instagram API returns, but is there really no way of getting a formatted text in return?
  3. I think this is a kind of special case. I don't know if all project that involve frontend editing (in combination with modal windows) do suffer from the same behaviour.
  4. Yes the problem seems to be related to the jQuery version I am adding manually in the header vs. the JqueryCore Version that is loaded in the PageFrontEdit.module file. The Alfred.js itself does not load any jQuery files (it just checks if there are any available). This is the solution that seems to work: 1. Load JqueryCore.js instead of any jQuery Version in the first place (do not use the 'defer' attribute here) ->add('/wire/modules/Jquery/JqueryCore/JqueryCore.js') 2. Disable the loading of JqueryCore.js in the PageFrontEdit.module on line 801: //'file' => $config->urls('JqueryCore') . ($config->debug === 'dev' ? 'dev/' : '') . 'JqueryCore.js',
  5. Hi @bernhard I updated a (not so old) project and I am using the following versions of modules - ProcessWire 3.0229 - RockFrontend 3.23.3 - RockPageBuilder 5.5.4 When loading a page in the frontend (when logged in) this error message is appears in the console: jquery-3.3.1.min.js?m=1531755686:2 Uncaught TypeError: Cannot read properties of undefined (reading 'dialog') at HTMLDocument.<anonymous> (<anonymous>:1:10079) at l (jquery-3.3.1.min.js?m=1531755686:2:29375) at c (jquery-3.3.1.min.js?m=1531755686:2:29677) When I want to open an alfred editor modal window via the "edit block" button, the modal window does not open. Instead I am redirected to the backend edit mask of the block page and this error pops up in the console: jquery-3.3.1.min.js?m=1531755686:2 Uncaught TypeError: r.getClientRects is not a function at w.fn.init.offset (/site/templates/scripts/jquery-3.3.1.min.js?m=1531755686:2:83688) at Object.getWithinInfo (/wire/modules/Jquery/JqueryUI/JqueryUI.js:6:14769) at e.fn.position (/wire/modules/Jquery/JqueryUI/JqueryUI.js:6:15042) at e.<computed>.<computed>._position (/wire/modules/Jquery/JqueryUI/JqueryUI.js:7:14716) at e.<computed>.<computed>.<anonymous> (/wire/modules/Jquery/JqueryUI/JqueryUI.js:6:5029) at e.<computed>.<computed>._position (/wire/modules/Jquery/JqueryUI/JqueryUI.js:6:5029) at e.<computed>.<computed>.open (/wire/modules/Jquery/JqueryUI/JqueryUI.js:7:6534) at e.<computed>.<computed>.<anonymous> (/wire/modules/Jquery/JqueryUI/JqueryUI.js:6:5029) at e.<computed>.<computed>.open (/wire/modules/Jquery/JqueryUI/JqueryUI.js:6:5029) at e.<computed>.<computed>._init (/wire/modules/Jquery/JqueryUI/JqueryUI.js:7:5169) This project uses by default jQuery 3.3.1. – I tried different jQuery versions but this error is always shown. Updating the jQueryUI version did not help either. In fact - what did help - was removing jQuery at all 🙂 but this is no solution of course. I am loading my scripts like this within the <head> markup: <? $scripts = $rockfrontend->scripts() ->add($config->urls->templates . 'scripts/jquery-3.3.1.min.js', "defer") ->add($config->urls->templates . 'scripts/lazysizes/lazysizes.min.js', "defer") ->add($config->urls->templates . 'scripts/aos/aos.js', "defer") ->add($config->urls->templates . 'scripts/bootstrap/util.js', "defer") ->add($config->urls->templates . 'scripts/bootstrap/carousel.js', "defer") ->add($config->urls->templates . 'scripts/bootstrap/collapse.js', "defer") ->add($config->urls->templates . 'scripts/owlcarousel/owl.carousel.min.js', "defer") ->add($config->urls->templates . 'scripts/lightbox/lightbox.js', "defer") ->add($config->urls->templates . 'scripts/main.js', "defer") ->minify(!$config->debug); ?> My question is: Does jQuery somehow collide with any of the sripts used to make the frontend editing and popups work? In all my newer projects I don't use jQuery at all so this never bothered me. This is one of my "legacy" websites however.
  6. Yes that seemed like a weird "hickup" in the log files. I never experienced this behaviour in any other project. But I am glad that it was an easy fix!
  7. Very interesting. The folder only contained only old logs: Logging the bd($entry) revealed an error from 2023 that was actually no longer part of the reay.php anymore. I manually deleted all tracy logs files inside the site/assets/logs/tracy folder and also deleted the cache folder under /assets. After that this error disappeared.
  8. I keep getting this error message on all backend and frontend pages in one of my projects: ErrorException: Undefined array key 1 in /var/www/html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/TracyLogsPanel.php:71 Stack trace: #0 /var/www/html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/TracyLogsPanel.php(71): Tracy\Bar->Tracy\{closure}(2, '...', '...', 71) #1 /var/www/html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(142): TracyLogsPanel->getTab() #2 /var/www/html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(115): Tracy\Bar->renderPanels('') #3 /var/www/html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(89): Tracy\Bar->renderPartial('...') #4 /var/www/html/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/DevelopmentStrategy.php(123): Tracy\Bar->render(Object(Tracy\DeferredContent)) #5 /var/www/html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/Debugger.php(314): Tracy\DevelopmentStrategy->renderBar() #6 [internal function]: Tracy\Debugger::shutdownHandler() #7 {main} I am using the newest PW Version and the newest Tracy Debugger Version, can anybody give me a hint what is happening here?
  9. I have a little update on this procedure: When disabling the two-factor authorization it is straight-forward and fast to add the customers instagram account into the app. First you don't have to ask the customer for the security code (on each login attempt) and second you don't need to add the clients instagram account to your facebook accounts center in the first place. When the app is working the client can feel free to re-activate the two-factor authorization.
  10. @bernhard another quick question: Is it possible to change the color (the tiny little dot) or even better, the text or background color of a type of event? Each parent page of an event has a specific category. Every category has a primary color and I want to reflect this in the event overview calendar.
  11. I just finished integrating this module on a client website (it's not live yet!) . The client has roundabout 85 groups. Each group meets on a specific date - recurring! So I added a RockCalendar field for each group and created the recurring events for each group depending on their meeting times. The group meeting times vary massively and you can think about every possible combination for example: "every second and last tuesday in every second month" and so on... This was no problem with this module! After that you can easily view and modify the events for the specific group: After creating recurring events for all of the 85 groups we now have about 5000+ event pages in the backend. This is huge! As expected from ProcessWire I did not notice any downgrades in the performance. The last thing I did - with the help of @bernhard- was to set up an "overview calendar" in the backend to get a quick look at all occurring events (for all groups): If you know how to do it this is an easy thing. You can hook into the "getEvents" method of the RockCalendar module and return custom - or modified - event data. In my case the overview calendar field is placed on the "group overview" template. This template has no direct event page children, so the overview calendar did not display anything. I used this hook to collect all event pages within the range of a month and return those events as an PageArray to the module as event data (this hook needs to be placed into the init.php!) wire()->addHookAfter('RockCalendar::getEvents', function ($event) { $pageId = $event->arguments(0); $startDate = $event->arguments(1); $endDate = $event->arguments(2); $template = wire('pages')->get($pageId)->template->name; if ($template === 'gruppe-overview') { $events = wire('pages')->find("template=event, rockcalendar_date.inRange='".$startDate." - ".$endDate."'"); $event->return = $events; } }); There you go!
  12. Thanks! You are right. After removing the HTML Entity Encoder Text Formatter form the field the decoding works.
  13. I have a trivial problem that is driving me insane. I am saving JSON Data into a field: $groupOverview->json_calendar_data = json_encode($eventsData); $groupOverview->save(); The JSON string is valid, as I have testet. In the frontend I turn this string back into an array like this: $eventsData = json_decode($groupOverview->json_calendar_data, true); bd($eventsData); The problem is: It always returns NULL. Printing out the field value as string works fine though, this is not a field selector issue.
  14. hi @bernhard I need a hint how to sort the events based on the "start time" in the rockcalendar_date field. I am collecting multiple events from multiple pages and put them all into one page array. Since the events are already sorted by date in the backend this works fine. But i need to sort those collected events by the time they start to print them out in order in the frontend. Right now it looks like this: As you can see the start time is not ascending but random. I need to sort the events like this. This selector is not working, but see it as an example how I thought it could work 🙂 $events = $pages->find("parent=$groups, rockcalendar_date.inRange='".$startDate." - ".$endDate."', sort=rockcalendar_date.start"); Edit: Sorting does work when using the "rockcalendar_date" field as query parameter. $pages->find("template=event, rockcalendar_date.inRange='".$startDate." - ".$endDate."', sort=rockcalendar_date");
  15. Hi @bernhard, I showed this module to a client and we want to integrate your module in an existing project. I am talking about this site here which holds roundabout 85 "recurring event" pages: https://www.kibis-itzehoe.de/ The site structure looks like this (just a snippet) As far as I understand the integration of the RockCalendar module from your youtube video, my question is: What is the best practice to integrate already existing pages into the calendar without re-creating or moving them? Right now every "event page" is actually called a "group page" (because it is a group that meets on a specific recurring date). I understand that i have to re-adjust the recurring event details when integrating it into the RockCalendar view again. What I like to avoid is to create each of the 85 group pages as a new "event page" from the RockCalendar view in the first place.
  16. @nbcommunication As the deadline of the 4th December is coming closer I started abandoning the old InstagramBasicDisplayApi module and using your new version. Thank you for releasing the new version!! I once again experienced that it is a real "pain" to set up an app via the Facebook Developer Account and then do the authorization for the instagram account that is going to be used. Maybe I am doing it wrong but I would like to ask how you - and the other users of this module - handle the authorization for client instagram accounts. Let me explain: 1. The client has a instagram account (so far so good...) 2. To make the integration possible: does the client have to set up an own facebook developer account and create the "Instagram App" inside this account by himself? To be honest, none of my clients is capable of doing this on their own. Thats why: 3. I am using my own facebook developer account to create the app 4. But then theres the authorization process for the instagram account: - You have to log in with the clients instagram credentials two times. Once to add the actual account and allow to fetch data from it. And second to generate a token. - Each time you log in with the credentials the two factor authorization method comes into place and sends a security code to the mobile phone of - the client! So basically you need to set everything up "together" with the client. And another problem: To be able to add the account to the facebook app in the first place you first have to add the clients instagram account to your facebook accounts center. Otherwise you won't be able to do any of the steps mentioned here in step 4! And this also does only work with two factor authentification. So therefore I am asking: How do you handle the integration process? I am using the InstagramBasicDisplayApi module in very few projects and I don't really have best-practice in setting up the integration yet.
  17. A very good Video. This is a top feature of Rock Frontend for me!
  18. Hi @bernhard I have an older project where I am using SCSS instead of LESS files. I want to make use of the SCSS parser function of RockFrontend. 1. I installed the SCSS module 2. I added this code to my ready.php: /** @var Scss $scss */ $scss = $modules->get('Scss'); $watchFiles = $files->find( $config->paths->templates . "styles/css", ['extensions' => 'scss'] ); // compile input SCSS to output CSS $scss->compileIfChanged( input: $config->paths->templates . "styles/styles.scss", watch: $watchFiles, ); 3. My stylesheet is included like this: <? $rockfrontend->styles() ->add($config->urls->templates . 'styles/styles.scss') ->minify(!$config->debug); ?> When opening the website in my browser I get this exception: ProcessWire\WireException Method Scss::compileRF does not exist or is not callable in this context By looking in the StylesArray.php in the RockFrontend module folder, line 293 I can see that this method is called here: $compiler->compileRF($asset->basename, $cssFile, $cssPath, $asset->dir, $style, $sourcemap); But the Method "compileRF" does not exist anywhere inside the RockFrontend folder.
  19. Thanks! Now I understand what was happening. Removing the "int" argument let's me check via "isset" if any of those parameters are passed.
  20. Hi @bernhard While testing my ajax endpoint with RockFrontend I noticed a behaviour. This is more a ProcessWire related theme however, there is nothing wrong with the ajax endpoint feature itself. I am using the ajax endpoints to handle form submissions on my pages. The URL for a request looks like this: /ajax/form?pageId=1401&formId=1418&lang=1016 So I am passing three get variables here: 1. pageId 2. formId 3. lang Inside my endpoint php file I am passing those values with the files->render method to handle the form submission: echo $files->render('elements/_formular',['page' => $pages->get($pageId), 'form' => $pages->get($formId), 'lang' => $lang]); As long as I am calling the endpoint URL together with those parameters, everything is fine. If I just call: /ajax/form I receive a PHP error that one ore more of the variables are "NULL". This is obviously! Now comes the part that I don't really get: I am retreiving the GET values like this via the ProcessWire API: $pageId = $input->get('pageId','int'); But this variable returns two different values, depending on how I output them: bd($pageId); // returns "0" return $pageId // returns "" So to check if I am actually passing values via GET I use the following condition: if (isset($pageId, $formId, $lang)) { echo $files->render('elements/_formular',['page' => $pages->get($pageId), 'form' => $pages->get($formId), 'lang' => $lang]); } But this does not work, the variables are all set to "0" when I am passing no parameter (I would expect NULL). So the question is: How would you elegantly check of one of those variables are set?
  21. Sounds very promising @bernhard! I a past project I had the need of creating and managing recurring events, too. Back then there was no calendar module available for ProcessWire, so I wrote my own logic using PW repeater fields in combination with the RRULE PHP library. The interface for a event page looks like this. In this example the event occurs every third tuesday in every month from 4pm - 6pm. I handle the updates of the dates that are displayed in the frontend via a cronjob that runs every night. The date field then gets updated, based on the set of rules that are set for the event: What is handy feature for me is to get an overview of upcoming events. Either in a classic "calendar view" or maybe in a small list overview like here. I list all events within the current week:
  22. Okay, so you commented out the save method and used the saveReady hook instead? I will try this out! Saving inside the "saveReady" hook brought me some trouble because I got catched in an endless save-loop. Thats why I used the 'noHooks' option here.
  23. Hi @bernhard! I noticed that the Scrollclass Feature has stopped working in RockFrontend (I am on version 3.19.0) https://www.baumrock.com/en/processwire/modules/rockfrontend/docs/javascript/ See line 258 of RockFrontend.js, the variable declaration for "j" is missing here: for (j = 0; j < attrs.length; j++) { This same goes for line 264: scrollpos = window.scrollY; Here is the updated snipped that will work: /** * Add/remove class on scroll position * * Usage: * <a href='#' rf-scrollclass='show@300'>Add class "show" at 300px scrollposition</a> * * Add multiple classes (thx @StefanThumann) * <a href='#' rf-scrollclass='show@300 show2@600'>Add class "show" at 300px scrollposition, "show2" at 600px</a> */ (function () { let scrollElements = document.querySelectorAll("[rf-scrollclass]"); for (let i = 0; i < scrollElements.length; i++) { let el = scrollElements[i]; let attrs = el.getAttribute("rf-scrollclass").split(" "); for (let j = 0; j < attrs.length; j++) { let parts = attrs[j].split("@"); if (parts.length != 2) return; let cls = parts[0]; let y = parts[1] * 1; window.addEventListener("scroll", function () { let scrollpos = window.scrollY; if (scrollpos >= y) el.classList.add(cls); else el.classList.remove(cls); }); } } })();
  24. Have you found a solution for specifying multiple "upload_dirs" inside this initial config call? It seems not to work here.
×
×
  • Create New...