Leaderboard
Popular Content
Showing content with the highest reputation on 12/24/2021 in all areas
-
This week there have been various small core updates and fixes but the biggest change was to the installer in 3.0.191. Last week we removed all but the site-blank profile from the core, cutting in half the size of the core. And because of this, the installer now needed to provide more direction about downloading and installing other site profiles. So it now does that and it also links to a new page that describes all of the past and current site profiles, along with additional details on how to create and install site profiles. Speaking of creating site profiles, the Profile Exporter module was also updated this week. It is now PW 3.x exclusive and is updated to recognize and work with various aspects and $config properties that are specific to 3.x. ProcessWire 3.0.191+ and the Profile Exporter module now support a custom /site/install/finish.php file which is a template file that is called when installation of a new ProcessWire and site profile has finished, but before it has cleaned up the installer. It is a plain PHP file that has access to PW's API and the installer, so it can do pretty much anything you could do from a regular template file or module. I added this because I noticed a few issue reports for the Profile Exporter module were requesting support of one thing or another, and I found that nearly all of them could be added just by having a profile-specific finishing file, for those that want it. So if you want your site profile to perform any other types of customizations on top of what you can already do with a site profile, this is the place to do it. This is where things are at this week but perhaps we'll continue to go further with the installer in supporting more things too in the new year, as there have been several good ideas. Thanks for reading and I hope that you all have a Merry Christmas and/or Happy Holidays!7 points
-
Hey @benbyf, I believe I'm not of much help. ? Me seems to be just another dinosaurs setup. ? IDE: Nusphere PhpEd PW Modules always: Admin DEV Mode Colors | ALIF - Admin Links In Frontend | Cronjob Database Backup | Process Database Backups | Login Notifier | User Activity | ProCache I develop on local https hosts (via Laragon on Windows); Where possible, I use Staging on subdomains of the (clients) LIVE server, as this mostly is the exact same environment setup like on LIVE; Sync & migration between all installations with Beyond Compare and the PW Database Backup Module, and/or the remote-files-on-demand hook from Ryan; Only very rare I directly work on STAGE via PhpED (SSH, SFTP), and afterwards pull it down to local; That's it. ?3 points
-
I usually use: IDE: visual studio code Server: hosting with DigitalOcean droplets administered with Serverpilot Staging: I edit over FTPS (I know!) on the dev server, then either copy or git to a live server. PW Modules: always use AIOM, ProCache, RockMigrate (looking into), ManageFiles, ProcessRedirects3 points
-
Hi Everyone! I feel I'm falling behind and becoming a "dinosaur" with how I work on the web, so in the hope to make myself feel better and hopefully learn from others Please sahre how you usually work on projects and tools you might use. Think: IDEs, servers and hosting, command line tools, PW moduels that help with development etc...2 points
-
Kind of embarrassed to mention my setup as it is all old school style stuff. local and remote LAMP stack SSH + RSYNC for bidirectional comms No composer, etc. Live server is with Ethernet Servers Ltd. Great VPSs. Great support too And the only module installed is Tracy VSCodium (VSCode without M$ nose buttin' in) Front end is plain html/css/js.2 points
-
Talking about dinosaurs... (To be fair I'm mostly just a "late adopter". I don't mind trying out new stuff, but rarely jump to new tools until they've been battle tested first.) IDE: VSCode, with a bunch of handy extensions (PHP Intelephense, Tailwind CSS IntelliSense, SCSS IntelliSense, phpcs, EditorConfig for VS Code, Git Blame, GitLens, Remote, etc.) Emacs when it makes sense to work on the live server, or I just need to make a few quick changes for a local site — though Remote extension for VScode works really well over SSH, so been using that more lately ? Dev environment: VirtualBox or Docker, depending on the project. Some of my own old projects, mostly the ones that I rarely need to touch, I tinker with on the live server ? Staging... is not really a part of my usual process. Changes go from local dev environment to live server ?♂️ Syncing between environments: combination of (bash) shell scripts and rsync ? Hosting: AWS for client stuff, Contabo for personal projects. Currently considering switching away from Contabo. It's super cheap, but sluggish. Could be my own making, but I would happily spend a few more bucks a month if it helps. Modules: that's a long list, but development oriented ones are Tracy, Wireframe, and lately ProfilerPro. Other modules I use on pretty much all sites include AdminBar, MarkupMenu, SearchEngine, ProCache, ProFields (particularly Repeater Matrix), FormBuilder, SchedulePages, Redirects, Process Changelog, Process Login History, WireMailMailgun, PrivacyWire ... and a handful of others, many of which were built by @Robin S ? Front-end: Tailwind CSS + build process powered by Gulp. Vue for some JS work, but mostly just plain old JS/ES. With all the goodies baked into the language nowadays, jQuery is obsolete. (Literally have had one case where I wanted to use it in the past two or three years: needed to serialize form data.) What else? Composer for managing PHP libraries and ProcessWire modules, NPM for JS, Git for version control (surprise). Think that's just about it ?2 points
-
Yet another functional setup without bells and whistles. IDE/Editor My "IDE" is a simple text-editor called neovim but due to a few plugins it has all I need. Yet I don't want to call it an IDE as it starts within half a second and runs from the terminal. My neovim has support for all kinds of LSPs, snippets, Git, code formatting, and whatever I really need. Tons of stuff. Tools Neovim - hyperextensible Vim-based text editor https://neovim.io/ As it says already it's a hyperextensible Vim-based text editor. I use it in a terminal and therefore it's pretty fast. Neovim has initialised a project already while VSCode starts. The absolute benefit for me is that I just need to download my configuration file(s) to a new setup, start neovim once or twice and everything is ready to go. No hassle. But the learning curve is ... weird. Tmux - tmux is a terminal multiplexer https://github.com/tmux/tmux/wiki Allows me to use just one terminal window to do 90% all the things I need to do through the day, while developing something with ProcessWire or frontend-related things. PrePros - Your Friendly Web Development Companion https://prepros.io/ In case I need a tool that does all the SCSS, Sass, less, JS things I prefer the easy way here. A benefit is that I can save the config file for each project right in the project, put it into Git and whenever needed I reinstall Prepros and go from there. Another hassle-free tool. ScreamingFrog - The industry leading website crawler for Windows, macOS and Ubuntu. https://www.screamingfrog.co.uk/seo-spider/ The easiest way to find issues on a website and while looking for errors it's stress-testing the hosting environment. In case you do SEO for a project you should give it a try. It's probably ProcessWire under the installable SEO-Tools. Missing NPM, Composer, yarn, npx and things like that? I'm too old for that. Whenever needed I download a module or use one of my site profiles right away. And for most other things Prepros does its job. Hosting/Server webgo - german hosting company. https://www.webgo.de/ Hosting Company of the Year in Germany since 2017 and probably the only hosting company I recommened to clients and even friends. But almost any other hosting company that has git and Let's encrypt support. I curate a list for myself to know where to go but webgo would be probably my choice. PW Modules FormBuilder ProCache ProFields (RepeaterMatrix, AutoLinks, VerifiedUrl) ProMailer AutocompleteModuleClassName Duplicator HannaCode ImportPagesCSV Jumplinks MenuBuilder PagefieldPairs PageHitCounter PricacyWire ProcessChangelog ProcessDatabaseBackups ProcessWireUpgrade RockHitCounter (PageHitCounter Addon by @bernhard) Snippets WireMailSmtp I guess these are most of the time self-explanatory. There are a lot more modules I have used, used to use and maybe will use some day. But all of these are in my default tool-belt when needed right now. Workflow I run Debian Linux on my main-machine where I do all my work and therefore have a local Apache2/MariaDB/PHP server setup running. Here starts absolute every project in its very own VirtualHost and Git repository. I prefer to use a similar setup like @horst and do the actual development on my local machine and then deliver it to a testing/stage/qa system where clients can take a look at the progress. The difference here is that my dev/testing/stage setups all run on my hosting accounts. I like to have a bit more control at this point. Everything gets transferred via Git. From local to testing/stage/qa and later on even the live environment. Changes will be made only on and within the local dev setup. So it's super easy to see whenever a client changes files or something was changed on the remote server. I guess that's all.2 points
-
2 points
-
This was indeed an intentional change in the core. @ryan explained it earlier elsewhere, and provided following snippet (which should be placed in /site/templates/admin.php) for cases where this behaviour is unwanted: if($page->process == 'ProcessPageEditImageSelect') { $editorPageId = (int) $input->get('edit_page_id'); $imagesPageId = (int) $input->get('id'); if($editorPageId && $imagesPageId && $editorPageId != $imagesPageId) { $imagesPage = $pages->get($imagesPageId); if($imagesPage instanceof RepeaterPage) { $input->get->id = $editorPageId; } } } While I get the reasoning (you're editing a Repeater Page, and thus it's logical for images to also be loaded from that same Repeater Page — plus there may be cases where an image gets unintentionally deleted since it's not used in any CKEditor field(s)), I've got a similar hook in place on all of our new sites, since I also find the previous behaviour preferable. Basically it restores pre-3.0.184 behaviour ?2 points
-
Update - 24.12.2021 After long days of reconsideration and experimenting I will deprecate the current state of Symprowire. I decided to get rid of my trys to integrate the whole Symfony experience as it grew pretty large pretty fast. Whats left you may ask? Well, the project is not dead. I am currently refactoring the whole setup to just use SymfonyHttpFoundation and Twig. I have a working proof right now, but have to polish some things first. The whole setup will come as a simple composer package to get called via a controller.php template file. Much like WireFrame. As you can see in the picture we will use the normal ProcessWire Workflow and just use the normal PageRender process. You as a Developer will get in control if to use the Setup for a particular Template or not. Looking forward to publish the proof. Cheers, Luis Debug Dump WIP 25.12.2021 Symprowire is a PHP MVC Framework based and built on Symfony using ProcessWire 3.x as DBAL and Service-Provider It acts as a Drop-In Replacement Module to handle the Request/Response outside the ProcessWire Admin. Even tough Symfony or any other mature MVC Framework could be intimidating at first, Symprowire tries to abstract Configuration and Symfony Internals away as much as possible to give you a quick start and lift the heavy work for you. The main Goal is to give an easy path to follow an MVC Approach during development with ProcessWire and open up the available eco-system. You can find the GitHub Repo and more Information here: https://github.com/Luis85/symprowire1 point
-
Hi @teppo thanks a lot for your insight, i was assuming something like that as it sounds very logical according to the pw "everything is a page" concept and us crazy devs are quite found of logics ? but thank you very much for the hook, it may help for clients who would be confused after a pw update and i'm sure @Alkrav will love it too ? have a nice day1 point
-
Project Update 24.12.2021 - Edited start post.1 point
-
Sorry for taking "a while" to respond, completely missed this message. First of all it looks like this should've been versionControlRevisions() method, not property (my bad). That might've been the issue here. If not, I'm not sure why print_r() returns 1 — I use it very rarely and am somewhat unfamiliar (and uncomfortable) with how it formats stuff. I'd start debugging by 1) using var_dump() or var_export() instead of print_r(), 2) checking with gettype() what type is returned and perhaps get_class() what class if it's an object, and/or 3) using Tracy Debugger to dump the value ?1 point
-
These seem very much related: there shouldn't be any need to skip over identical (consecutive) entries, since such entries shouldn't occur ? In the latest dev version of the module I have some issues with image fields, where a) adding an image via AJAX is registered as a change, and then b) on page save field content is updated, also registering as a change. This could be related, perhaps? You could check which fields are involved by querying version_control__data and version_control__revisions database tables: the data table is connected to the revisions table with "revisions_id" column, and each row in the data table refers to a single fields_id + property pair, so there may be multiple data rows for each revision row. I'm hoping to get the latest changes (currently in feature-data-objects branch at GitHub) polished and merged to dev, hopefully that will fix this issue as well. Fingers crossed that I'll get there soon. Any changes/updates to this module are pretty time consuming — part of why the feature-data-objects branch exists is to reorganise things, hopefully bringing sanity to the module's architecture ?1 point
-
1 point
-
You need creating form using dynamic row <input type="text" name="fieldname[]"> Then, using this php code to fill the repeaters <?php $fields = count($_POST['fieldname']); $p = new Page(); $p->template = 'template_name'; $p->parent = $pages->get('/parent_name/'); $p->name = 'page-name'; for ( $i=0;$i<$fields;++$i ) { $repeater = $p->repeater_name->getNewItem(); $repeater->field_in_repeater = $input->post->fieldname[$i]; $repeater->save(); } $p->save();1 point
-
Just a quick note that the above example will need an adjustment if the site uses a non-default asset folder or url. To make this work when serving assets from, say, /data/* or assets.domain.com/v1/*, we can use the path and url settings for the files folder instead of root. if ('url' === $event->method) { $file = $config->paths->files . substr($file, strlen($config->urls->files)); }1 point
-
If you are using cloudflare.com you might also want to create a page rule like: *mydomain.com/processwire/* Security Level = High Cache Level = Bypass Disable Apps Disable Performance This should prevent any of the Processwire admin from being proxied by cloudflare.1 point