Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Hello Flo, I have pushed the module version now to 1.3.6. This version does not auto populate the fields. I have removed all the Hooks which are responsible for auto population. So this is the one, which fits your requirements and you can use it until the other additions have been implemented. Best regards
  3. I tried accessing your website (and the problematic page) last night and also encountered the error. The error message that I received was about a proxy server having issue, however. Is the current host using nginx or Apache? If there's a proxy server somewhere in there (if not nginx) then it's going to be beyond my experience/capabilities to know how to help. Otherwise, maybe look into why that particular page section (Newsboard) seems to cause trouble when other pages mostly load rather quickly. ProDevTools' ProfilerPro might be useful here, if identifying problem areas on your own ends up being difficult to find.
  4. @Juergen No worries! I am looking forward to it and happy to test, when it's ready. 🙂
  5. Great idea! I will try to publish the new version as soon as possible, but I cannot say when it will be happen.
  6. And I just had another idea 😄: Pages that will be changed by the module in the future could also be marked in the page tree, e.g. prefixed with a "clock" icon.
  7. Great news! 🙂You could even attach a hook on page save that triggers a warning if a published page is unpublished manually, but will be published by the module again in the future (could work analog for an unpublished page that is published manually, but will be unpublished because of a "publish_until" date in the future).
  8. Making a visible alert/info about the current status and the future status too seems to be a good way and I can agree with it too. I will implement this feature and update the module after test runs.
  9. I would disagree on that. If you only want to schedule publication of some of your pages, you would not expect anything to appear in these fields on pages that have been published manually. In contrary I think it is misleading this way, because it looks like the publication had been scheduled, although it was not. I think it is much clearer if the fields give a clear indication of the user's intention: Blank = nothing happens Filled = publish/unpublish at this date/time Imho the page status is handled by PW and editors should be aware that they can publish and unpublish pages manually. Your module is a great addition, but in my eyes it should enhance the core functionality by offering a way to schedule publishing/unpublishing without forcing additional actions or altering page data. Maybe it would be a nice addition to show a status in the fields that informs the user about the effect of the module like that (in an InputfieldMarkup or as description of the fieldset): Page is currently PUBLISHED, no settings have been applied Page is currently UNPUBLISHED, will be published on XX.XX.XXXX – XX:XX:XX Page is currently PUBLISHED, will be unpublished on XX.XX.XXXX – XX:XX:XX You could even make it really fancy and include a countdown or something like that. This is of course just a quick thought and I do not want to "order" new features. I just wanted to address the user experience aspect and make a suggestion how it could be improved.
  10. Maybe I'm missing something but isn't your selector returning another page then? If you uncheck the checkbox then you have pj_kub_published='' for that page, but you are selecting =1, so your page does not match and it will find another page having =1 and that obviously has a modified date in the past?
  11. I have a strange issue with a page's modified property. I am using the following code to get the timestamp of the last modified page's last modification: $selector = 'parent.template=artworks, template=artwork, pj_kub_published=1, pj_kub_images.count>0, include=all'; $last_modified = strtotime($pages->getRaw($selector.", sort=-modified", "modified")); pj_kub_published is a checkbox. It is used to determine whether a page should be visible or not. When the checkbox is changed on a page and the page is saved, I expect $last_modified to represent the modification timestamp of the page with the latest edit (timestamp of page save). This works if I check the checkbox (pj_kub_published=1) and save the page: $last_modified = 1714047595 But if I uncheck the checkbox and save the page, the timestamp in $last_modified becomes some time in the past: $last_modified = 1714030794 The date/tim shown in the settings of the page edit dialogue is accurate though. This is really annoying because I am caching some output in files and use this timestamp to determine whether the cache should be renewed. I have found no explanation for this behaviour. Already tried diabling $config->dbCache without success. Without the selector the result is as expected and changes on every page save: $last_modified = $pages->getRaw("sort=-modified", "modified"); Is there anything I am missing here or any other way to get an (accurate) timestamp of the last modification of certain pages using the api? @ryan is there some kind of query caching involved?
  12. It is more consistent, if a page is published and the date and time of publishing is visible in the published from field too. Otherswise, it may seem a little bit strange to some users, if the page is published, but the publish from field is still empty. But you are right, if you mean the visibility is handled by ProcessWire only 🙂
  13. Why would it? The page status is handled by PW. Why would your module need to change values if I publish a page manually?
  14. Hello Flo This is not so trivial as it may seem at the first sight, because there are use cases where automatic population makes sense: For example: An auto population has to take place if your page is unpublished and you push the publish button, but you do not have entered a date into the from field. In this scenario the current date and time have to be set (auto populated) inside the from field. I will test some other scenarios as well and I will provide another update, if there are some use cases not covered by this version.
  15. @Juergen, thanks for your quick reaction and taking care of the issue! I would appreciate a solution that does not populate dates automatically (e.g. setting a "from" date not for unpublished, but only for published pages). In my opinion the module should only read and interpret these values.
  16. Hi webguy, Unless your client wants to be able to entre their Google Tag ID themselves, no need to create a field for that. As markus-th said, just hard-code it in a partial template that is included on every page (the one that contains the <head> part of your pages).
  17. Hello webguy, to integrate a Google tag on your site, you can integrate the code e.g. in the header template (sometimes _header.php). But the answer is not quite that simple, as it depends on how the templates of your site are structured. My templates usually look like this: _header.php _footer.php home.php (include header, templatecontent, footer) basic-page.php (include header, templatecontent, footer) ... and so on 😉 I hope this helps
  18. Hi everyone! I apologize for what is probably a dumb question. I have two Google Tag codes that I need to have running on every page. Is there a specific way I should do this? There are no fields for it in the template. My first though was just echoing the tags with PHP on a file that runs everywhere. Is that possible? And if so what file would it be best to add it to? I really appreciate your help, I have never used ProcessWire before.
  19. Yesterday
  20. @netcarver: Thanks for your quick reply ! I use Firefox as well (and I've just tried from another computer with Firefox as well) : same troubles… The in-cache pages are ok, but if you go one the Newsboard and then click on a pupil's name (to go the his or her profile page), it loads for ever until the error occurs… And if I try to log in, the same error triggers again (I suspect because after logging in in the front end, I redirect to that Newsboard which has quite a lot of content). To log in to the backend, I type the /admin url and use PW login form. But then again, it happens that I have to wait for the eoor, then clean cache and cookie and/or come back by hard typing the backend url. Regarding the modules : Croppable Image 3, Leaflet Map Marker, Front End Edit Box, Limit Repeater, Login Notifier, Clean Empty Page File Dirs, Pages2Pdf, Changelog, Database Backups, Hanna Code, Login History. I had a problem with Hanna Code while migrating and the table is absent in PhpMyAdmin. I haven't managed to solve this issue yet. Could the Session DB handler (which I use as well) be a cuprit ? (But I think it breaks things a little if I turn it off). Another weird thing I had to face while migrating : file permissions error. Even though I set my config.php to 775 and 664, my FileZilla indicated 770 on assets/ directory and kept telling me 'permission denied' when I tried to change that. I had to rename the assets/files/ and put that directory back to load all my assets files. I can see though that my pages seem to be written in assets/cache/pages so I guess the problem is solved on that side (?). It is really a brain-teaser (and I guess that's an understatement 🙂) to me ! And I can't see any errors in the logs files (when I manage to get to it through the backend)… When the site starts looping, I can see a 'lock unabled' (can't remember the exact line) error.
  21. The front-end seems to work fine for me using Firefox - on the old and new sites (although you have a trailing ')' character in the new site URL you posted above.) Can you give post a set of steps to reproduce the issue? Does the error occur only in the admin interface or once users are logged in? Hmm, an error 429 is the HTTP server telling you there have been too many requests, and that it's rate-limiting you. What plugins have you got installed and activated?
  22. Hello, I'm desperately trying to re-install my site on a new (more official) host and I've been struggling for 3 days with poor results… The server keeps kicking me out when I go to a new page. If a load occurs, it then works quite well thanks to cache management. At first, I thought about a problem on my side since I'm not an expert at coding and thought that as my site was getting bigger with my pupils, it was not optimized in fetching data and I was trying to improve that. But : everything works fine on my localhost. everything worked (and is still working) fine on my previous webhost ( https://planetalert.tuxfamily.org ) although loading time is a little long. the backend throws the error as well !! And that's what surprises me. If backend doesn't work, I feel like my poor coding skills are not the culprits 🙂 But then I have absolutely no idea of where to dig now and I am quite annoyed of seeing my site (which was getting more popular with my pupils and also getting more popular with my colleagues) not being able to be launched on the academic server ( https://sites.ac-nancy-metz.fr/planetalert/ ) 😞 So if anyone could give me some kind of help on that, I would greatly appreciate. I'm ready to grant all admin access to someone willing to help beacuse I'm really stuck on this. If the code is needed, my templates files are available here : https://forge.apps.education.fr/flenglish/planetalert Thanks ! PS : I have read many posts on this forum trying to find hints. I've disabled Tracy Debugger and things were a little better, but still… backend doesn't work as expected. Whenever I modify a page and click on 'Save', I get a server error (error 429)
  23. Fun fact. Creating a local backup of a live Wordpress site was easier with DDEV too. MySQL and PHP versions can easily be set in .ddev/config.yml to match the LIVE versions. Adding a POST import-db hook automatically replaces the hardcoded site URLs in the database.sql dump to match the URL on my localhost when running ddev import-db —file=database.sql.
  24. Hello Flo, thanks for reporting this issue! You are right - the automatic population of the "from" field should not happen if a page is unpublished at the moment of saving. I will not add a quick fix inside the Hook function only, which is responsible for this behaviour. Instead I will test the module functionality more intense before offering a new update. I guess (hope) I will offer a new update solving this issue til the end of this week. For the moment, please overwrite the "from" date with a far date in the future to prevent the page from beeing published. Best reagards Jürgen
  25. Hey @Andi thx for your open eyes! I've just pushed a "fix" for this on the dev branch. The thing is that this JS markup is needed sometimes and therefore will be rendered as soon as RockFrontend has some variables set. This was the case for isDDEV and therefore you saw the output. I don't see anything bad with having that markup on my sites. If anyone has good reasons to remove it let me know. The idea is to have a central place to send settings from the backend to the frontend. Some of them are only necessary when logged in, but there might also be situations where a module wants to set something that the frontend consumes. For example the root url of the site, that is unfortunately not always "/" but could also be a subfolder like "/myproject". On the backend that's easy via $config->urls->root, but on the frontend there is no standard and so I added this global RockFrontend variable/object that can hold these kind of things. The order in which you call ->styles() or ->scripts() does not define the order of the output. This method defines it: private function injectAssets(string &$html): void { $assets = ''; foreach ($this->autoloadScripts as $script) $assets .= $script->render(); foreach ($this->autoloadStyles as $style) $assets .= $style->render(); $html = str_replace("</head>", "$assets</head>", $html); } That means scripts will always be rendered first, then styles. I can change that if anyone has good reasons, though I think it does not make a difference. The more important thing is that you can or probably should add "defer" to your scripts, which makes the script load at a later point when the dom is ready. With UIkit this can lead to problems though as it might cause FOUC, because uikit adds custom classes like "uk-grid" when using <div uk-grid> for example. If you are not using defer, then it will work without issues. If using defer, you'd had to add the class manually: <div class="uk-grid" uk-grid> I'm simply loading these 47.8kB upfront to make my life easier.
  26. Hi @Juergen, unfortunately I have a problem again or maybe I am just really confused on how the module should work or might have worked in my case before. I have JkPublishPages enabled for one template only. This is an article page (news_article). Editors should be able to schedule publication of articles by selecting a date and saving (as unpublished). I would expect that JkPublishPages works in the following way: If no date (jk_publish_from or jk_publish_until) is given, the page status stays completely untouched (unpublished in my case) If jk_publish_from is given, JkPublishPages changes the page status to published on the first execution of LazyCron (after the selected date) If jk_publish_until is given, JkPublishPages changes the page status to unpublished on the first execution of LazyCron (after the selected date) Please correct me, if this is not the intended behavior. In my case whenever I create a new page or change an existing page, the jk_publish_from field gets populated automatically on page save with the current time, although I save the page as unpublished and keep the field empty. This in turn results in an (unwanted!) publishing on the page on the next execution of LazyCron. I think that the problem is in the following part of the code (lines 412ff): protected function setPageStatusManually(HookEvent $event): void { $page = $event->arguments(0); // check if jk_publish_from field is present on the given page if(!is_null($page->jk_publish_from)){ $from = true; bd($page->jk_publish_from); if ($page->jk_publish_from) { $from = $page->jk_publish_from < time(); bd($from); } else { $page->jk_publish_from = time(); bd($page->jk_publish_from); } $to = true; if ($page->jk_publish_until) { $to = ($page->jk_publish_until > time()); } if (!$from || !$to) { $page->addStatus(Page::statusUnpublished); } } } If jk_publish_from is empty on page save, it gets populated automatically. Is this intended? Shouldn't the module only act if a value has been (explicitly) added by the user? The editors brought up this issue because they often draft new articles without knowing the puplication date in advance. The drafts shall of course stay unpublished until they are ready to publish and explicitly scheduled or published manually. Your clarification is highly appreciated! Best Flo
  1. Load more activity
×
×
  • Create New...