Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Mikie last won the day on December 6 2018

Mikie had the most liked content!

Community Reputation

96 Excellent

About Mikie

  • Rank
    Full Member

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey is there any setting to disable / hide Crop and Actions on images fields? All I have found is the below, is this still the answer?
  2. Hi @kongondo, I don't know where I got it but my initial impression of your variations module was that it was using sqlite or something. Just had another look and believe I am wrong, everything seems to be in templates and pages.
  3. Will also say that when troubleshoot npm issues (just then I had problems with BrowserSync not refreshing css changes!) I find it is usually to do with outdated modules. The following usually fixes for me: - run https://www.npmjs.com/package/npm-check-updates and update your dependencies to latest - wipe contents of node_modules_folder - delete package-lock.json - run npm install
  4. Cool. Sounds like you are sorted. On the node / npm front, I think the easiest way to wrap your head around using node for build systems is to skip the bundlers and task runners and just use npm scripts. The benefits of this are you are using the cli's of each library you install directly, and not interacting with wrappers and plugins build upon these. This makes things easier to debug / easier to reason about. Here are some blog posts on this topic: https://www.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/ https://deliciousbrains.com/npm-build-script/ https://scotch.io/tutorials/using-npm-as-a-build-tool For browsersync in particular, the below cli commands are all you will ever need to know: # static site browser-sync start --server 'public' --files 'public' --browser 'Google Chrome' --no-notify # php site with local domain using eg dnsmasq browser-sync start --proxy 'localdomain.test' --watch --files public/site/templates --browser 'Google Chrome' --no-notify After years of npm scripts I now use https://github.com/sezna/nps and https://github.com/kentcdodds/nps-utils for cross platform builds. Here's an example package-scripts.js: /* global require */ /* global module */ const { series, concurrent } = require("nps-utils"); module.exports = { scripts: { css: { dev: "gulp cssDev", build: "gulp cssBuild" }, js: { dev: "rollup -c rollup.config.dev.js" build: "rollup -c rollup.config.prod.js" }, server: { start: "browser-sync start " + "--no-inject-changes " + "--proxy 'localdomain.test' " + "--watch --files public/site/templates public/static " + "--browser 'Google Chrome' " + "--no-notify " }, watch: { css: "chokidar 'src/stylus/**/*' -c 'nps css.dev'", js: "chokidar 'src/js/**/*' -c 'nps js.dev'" }, dev: { pre: series.nps("css.dev", "js.dev"), main: concurrent.nps( "watch.css", "watch.js", "server.start"), default: series.nps("dev.pre", "dev.main") }, build: series.nps("css.build", "js.build") } }; Then in package json you just have: { ... "scripts": { "dev": "nps dev", "build": "nps build" }, ... } Cd to your projects and: # run dev w/ livereload npm run dev # run your build (minification etc) npm run build # test individual nps commands npx nps server.start I'm using gulp for css since I use stylus and gulp is the easiest way to run stylus through a bunch of postcss transforms. Rollup is by far the easiest way to bundle js in my opinion. Here's my rollup build file pretty much for every project. The dev version doesn't include terser and sets source maps to true. /*jshint esversion: 6 */ import resolve from "rollup-plugin-node-resolve"; import commonjs from "rollup-plugin-commonjs"; import buble from "rollup-plugin-buble"; import { terser } from "rollup-plugin-terser"; export default { input: "src/js/main.js", plugins: [ resolve({ mainFields: ["module", "main"] }), commonjs({ include: ["node_modules/**"], sourceMap: false }), buble(), terser({ compress: { drop_console: true } }) ], output: { file: "public/site/templates/assets/main.js", format: "iife", sourcemap: false } };
  5. In my case, installing a module with the same class name as a personal module I had been working on broke my site. Wiping the site/assets/cache and session files and removing the offending module folder didn't work, so I emptied the caches database table. This restores access to the admin, however I then get a bunch of errors about Inputfields not existing like the screenshot in the original post in this topic. If I then refresh my modules the site breaks again with a specific "Class not found" error. The fix is to re-order the offending modules declared in the Modules.site/modules/ row of the caches table in the database, as explained here: Regarding "This request was aborted because it appears to be forged!", the only time I have seen that was when I was on a load balanced internet connection, eg a router splitting access to two WANs. I hadn't configured the router to keep individual local ips on the same connection, and thus it kept switching my computer's public ip and the only reason I figured this out was 1. processwire 2. banking websites!
  6. Mikie

    HTTP/2 Push

    @dragan cool thanks. Adrian is wondering if pw core should be doing any of this. Any thoughts on what could specifically be optimised in the admin?
  7. Mikie

    HTTP/2 Push

    There is also: https://www.tunetheweb.com/performance/http2/http2-push/ https://icing.github.io/mod_h2/push.html https://www.manning.com/books/http2-in-action
  8. Mikie

    HTTP/2 Push

    Hi @adrian. Been looking into this more. Is it as simple as just adding the preload directive, then browsers fall back or ignore if unsupported? I have have read the articles posted, but am still not clear on that.
  9. Hey @jploch sorry I missed this. How’d you go? I am not 100% sure on the above, creating a hidden admin page with a Process module is the simplest way to do it, but i think you can use Ajax with inputfields, like talked about here:
  10. This repost of ^ old info makes me feel things are on track 🤞. Building a site with padloper right now but it’s pretty handicapped. Hey @kongondo another question, will parts of padloper live in thier own custom data store, or is it all in the site db?
  11. Sorry for the spam on this post, but I just went through the process of figuring out and setting up the above so I thought this might help anyone interested. Lets say you have: - domain1.com in G Suite with user@domain1.com as a user account - domain2.com that you want to relay mail through GSuite SMTP Add domain2.com to the domains of your G Suite without adding all the MX records, just the txt DNS record for confirmation. You can of course add the MX records as well, but if you aren't going to use domain2 for new G Suite users or as an alias for existing users, then no need. In admin.google.com Apps > G Suite > Settings for Gmail > Advanced settings look for "SMTP relay service" under routing and add a setting like screenshot below. This will let you: - authenticate smtp-relay.gmail.com:465 or smtp-relay.gmail.com:587 using user@domain1.com / password - send mail through GSuite relay as anyadress@domain2.com The only things to note are: - both the above need TLS enabled. I believe if you use 25 without SMTP AUTH you can only send to accounts in your G Suite organisations but I might be wrong, the instructions are quite confusing - to save to your sent box in the account you use for auth you need to enable comprehensive mail storage for G Suite Also I haven't tested this with any of the Processwire SMTP modules, I have a working setup using postfix. Will be testing this with PW soon thought so I'll report back here.
  12. Also, to avoid enabling insecure apps in Gmail the recommended method is to enable 2FA on your Google account, then you can add passwords for individual apps.
  13. Hey @ryan, I wanted to comment on this blog post but couldn't figure out how. There is a different google smtp service for G Suite users that lets you send mail from custom domains / addresses / ips. It also has huge free sending limits per user per day. Ideally the domain you'd like to send from should be added to your G Suite account, but you can also send from domains that aren't associated with G Suite. See more info here https://support.google.com/a/answer/2956491. I think it would be relevant to flag this as lots of people use G Suite but don't seem to know about it.
  14. Mikie

    HTTP/2 Push

    Above is off topic sorry, I was getting push confused with the http/2 functionality of all resources getting sent async in a single connection (which does happen out the box). Yes, push is confusing and it seems there are no real standards or guidance on how to use it. I feel it is pretty extreme optimisation since after first load things are cached anyway. What would be a candidate for push in PW Admin, assets from unloaded modules or image previews or something?
  15. Mikie

    HTTP/2 Push

    This is all dependent on the server, nothing to do with php as far as I know. If the cache headers are there (which they are for PW admin assets) then it should just work out of the box. See below for one of my sites, all assets h2 brotli encoded and server from browser cache:
  • Create New...