Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/29/2021 in all areas

  1. This is just a quick info that I've built a little module on top of @David Karichs great PageHitCounter to store and present historical data of page views. Note that "historical data" means it can display all pageviews from the time this module has been installed. It can NOT show statistics from before that point of time! It is by no means meant to replace a full analytics software, but for simple sites this might be just what you (or the user) need(s). I release it as imperfect as it is for two reasons: Even if the presentation of the data is not perfect yet it might make sense collecting statistics sooner than later. If anybody wants to work on the presentation side I'd happily merge PRs (or if anybody wants to sponsor updates... PM) Presentation is done by plotly.js in conjunction with the awesome tabulator.js (both loaded via CDN at the moment) - that means easy analytics can already be done by using tabulator's internal filter capabilities! Please see the readme for important notes! https://github.com/baumrock/RockHitCounter
    3 points
  2. Or going the other way round, adding the pipe to the whitelist (and forcing quotes for it): $ptions = [ 'whitelist' => ['|'], // selectorValue() normally strips out pipe symbols, so allow them 'quotelist' => ['|'] // Have selectorValue quote values that contain a pipe symbol ];
    3 points
  3. The biggest issue seems to be that /site/templates/js/jquery-1.7.2.min.js is somehow corrupted. Try transferring it again, or alternatively downloading jQuery 1.7.2 directly from jquery.com or some other site where it's available in it's original form. Edit: actually... same goes for most of your other JS files, and some parts of CSS files as well. If you have original (pre-transfer) versions somewhere, try transferring them again (via FTP or whatever method you used). It looks like something went wrong while files were being uploaded (or downloaded). If you have the full source code for the site available, you may even want to transfer it again to the server, or alternatively compare it with current versions to make sure there are no more broken parts ?
    2 points
  4. Thank you both, unfortunatelly I can't test your suggestions right now, because the site is still using PW 3.0.150, which doesn't has these options. Upgrading PW to the latest dev broke my site, so I had to return to the old version for now. But I could solve my issue for now by quoting the value in the selector. After updating PW I will try your suggestions. pages()->get("template=$templateName, parent=$parent, title=\"$value\"");
    2 points
  5. Ryan made some updates last night which fixed it for me. Have you tried the latest dev?
    2 points
  6. @Joss I had the same error https://github.com/ryancramerdesign/ProcessHannaCode/issues/23
    1 point
  7. It can result in a lot of data being stored in the database. From your earlier post it sounds like that could be at least one reason why your database takes so long to back up. In my experience a ProcessWire database taking very long to migrate/backup/etc. usually means that the site has at least one, and possibly more than one, module that keeps storing data without limits (or with very loose limits). Jumplinks' 404 monitor is one module/feature that can do this, while ProcessChangelog and ProcessLoginHistory are other typical culprits. I believe Jumplinks has an admin tool for checking the number of stored 404 hits and clearing them, so it might be a good idea to check that, just in case ?
    1 point
  8. How did you migrate the site? Did you copy all files over and imported a DB dump? If so... try the Duplicator Module as it exports each and every asset you might need into an installer. There are some errors in the console which are... weird... and therefore out of my knowledge. You might also check the following things: delete all compiled files from modules via admin interface or... delete ProCache cache if ProCache is used delete cached parts of the site (/site/assets/cache/) use only the PW version the site was already reading use PHP 7.4 (for newer PW instances) In addition to the above you might give us some more details about: What modules is the site using? Which version of PW? Which version of PHP? Which version of MySQL/MariaDB? Do you still have access to the old version of the site? Could you switch back and create a staging environment for the new site?
    1 point
  9. I don't think I have had that kind of problem in the last nine years! Which says a lot for Ryan.
    1 point
  10. Do you have the 404 monitor switched on in Jumplinks?
    1 point
  11. Yes he hasn't bumped the version to 3.0.176 yet. Some things do break here and there on the dev branch but its very rare.
    1 point
  12. This is what I am using: $this->wire->addHookAfter('ProcessPageEdit::getSubmitActions', function($event) { $page = $event->process->getPage(); if($page->template != "foo") return; $actions = $event->return; unset($actions['next']); $actions['clone'] = [ 'value' => 'clone', 'icon' => 'clone', 'label' => 'Save + create copy', ]; $event->return = $actions; }); $this->wire->addHookAfter('ProcessPageEdit::processSubmitAction', function($event) { $action = $event->arguments(0); // action name, i.e. 'hello' $page = $event->process->getPage(); // Page that was edited/saved if($page->template != 'foo') return; if($action === 'clone') { $copy = $this->wire->pages->clone($page); $copy->title .= ' (copy ' . uniqid() . ')'; $copy->save(); $this->wire->session->redirect($copy->editUrl); } });
    1 point
  13. if($this->showForBackend) { $this->addHookBefore('ProcessPageList::execute', function ($event) { wire('config')->styles->add($this->config->urls->PageHitCounter . 'PageHitCounter.min.css'); if($this->wire('input')->get('mode') != 'select') { $this->addHookAfter('ProcessPageListRender::getPageLabel', $this, 'addPageListHitCounter'); } }); }
    1 point
  14. @wbmnfktr I have attached the complete list of all the entries. kommuner2.txt @a_dent I don't think so as that is not the only municipal with swedish characters ? [edit] Dude, you are probably correct! There is a "Habo kommun" in the list, I didn't even think about that! I'm gonna try and add it with a slightly different name.
    1 point
  15. Welcome to the forum. Great post!
    1 point
  16. There's no overhead to pages that is worth worrying about. In my opinion Page Reference fields are a better choice than Select Options fields in 90% of cases - they're more powerful, flexible and future-proof. They're very easy to set up thanks to @adrian's wonderful Page Field Select Creator module. And they do what you're wanting out of the box - via the core "Allow new pages to be created from field?" setting, or via Page Field Edit Links if your referenced pages evolve to contain multiple fields and you want to fill those out as new pages/options are created.
    1 point
  17. I am not aware of such a field. Go with Page Reference. It is not really an overhead - you really need to store data somewhere, so why not in pages? And if working in PW you use pages as "everything is a page"), remember ))
    1 point
  18. I just stumbled across this video, and wasn't sure if it found its way here already. It's a very different take than the tutorials that were available when I was first trying to learn ProcessWire, and I think something like this might have been helpful for me. Trying out ProcessWire (Part 1) [YouTube]
    1 point
  19. Hi @Nicole Bardales I don't have a solution for you yet, but a recommendation that might help: Install TracyDebugger and you'll get a better output of your error and also some great tools for debugging your scenario. For example you can add bd($var) calls in your code and get a nice visual dump of your variable and can then track the issue down. It is a great tool for learning PW and PHP in general because it makes a lot of things visible that are usually hidden somewhare in the memory ? Hope that helps a little ?
    1 point
×
×
  • Create New...