Leaderboard
Popular Content
Showing content with the highest reputation on 01/25/2022 in all areas
-
The JSON that this feature generates for import/export mostly works for me, however the issue is having to manually select fields/templates via the UI. I notice that templates include a timestamp for when they were changed in the data field of the templates table, but fields don't. If both did, then it should be possible to get fields and templates that have changed since the last build time of a module or template. I use the admin UI, and don't want to write more code than I have to. Specifying what fields and templates that a module depends on in code and letting the system pull a config file with the definition of those fields and templates from the database would be UI friendly, but not rely on having to remember what fields or templates are required for a specific purpose, but not require much code either. This is similar to a database first workflow I have with SQL Server and ASP.Net Core. I can reverse engineer any tables I want from SQL Server to get a class definition, so I don't need to worry if the definition of something was manipulated outside my code; I can always grab the current definition without having to write any code. For those who have a licensed copy of Padloper 1, it's interesting to see how it creates the fields and templates it needs. It appears to be using JSON files based on the field and template import/export feature, but has its own code to import them. With a timestamp and possibly a version number added to the data in the fields and templates table, I wonder if that would make a hybrid UI/code based update model easier to work with? Of course for more complex migrations, RM is more capable, but I wonder if even there, it can grab the field and template definitions if they're exported as JSON?3 points
-
https://jetpack.com/2022/01/18/backdoor-found-in-themes-and-plugins-from-accesspress-themes/3 points
-
Templates have a modified property, but fields don't. This might be a useful and simple core feature to implement that could make it easier for anyone wanting to track changes. The Templates Export function shows the modified field, but it's sorted by template name. For quick manual exports, having the option to sort by modified timestamp would be an improvement. Once fields have a modified property, they also need to have the option to have the export function list them by modified timestamp. I see the base Wire class that everything else in the core extends has change tracking properties and methods, although currently there doesn't seem to be any built in method to enable persisting that with fields and templates when they're changed via the UI. Up to date, I haven't really required the sort of version control others are discussing, but I have a couple of sites now, where I'm looking at bundling up functionality as modules for automated deployment to other sites, and the manual exporting of fields and templates doesn't really cut it, but I've built my data structures via the UI, so having an efficient way to convert that to code that can be used for multiple deployments would be useful. With Visual Studio, I'm used to working with the option of using either visual designers or declarative code to build apps, and either way end up with code that can be included in version control.2 points
-
Hi, yes ? have a look at this blog post https://processwire.com/blog/posts/processwire-3.0.75-and-a-new-version-of-prodrafts/ have a nice day edited to say i should have clicked on your links before answering... so, just yes ?2 points
-
+1 +1 Could be a good first (or next) step towards automated file based migrations with rollback feature! ?2 points
-
Hi community, last week I've tried to get PHP SSE working. Unfortunately without success. When using laragon it works, but on my DDEV setup and also on my live server it does not. I think there is some kind of compression and/or proxying going on, but I don't know how to debug or disable that. @kongondo and @netcarver have mentioned SSE is "is so simple it is unbelievable at first." Maybe you can help me? This is what I've tried: <?php header("Cache-Control: no-cache"); header("Content-Type: text/event-stream"); $i = 0; while(++$i<=10) { echo "event: ping\n"; $curDate = date(DATE_ISO8601); echo 'data: {"time": "' . $curDate . '"}'; echo "\n\n"; file_put_contents(__DIR__."/dump.txt", "triggered@$curDate\n", FILE_APPEND); ob_end_flush(); flush(); if ( connection_aborted() ) break; sleep(1); } <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <script> const evtSource = new EventSource("sse.php", { withCredentials: true } ); evtSource.onmessage = function(event) { console.log(event.data); } </script> </body> </html> The file_put_contents works as expected, just the javascript does not get the messages from SSE: The eventstream is sent after 10 seconds at once and not on each event: Then the request is sent again and the same process starts from the beginning... You can try the example here: http://sse.baumrock.com/sse.html I'd be very happy if anybody could help me making this work ?1 point
-
The problem: Synchronizing fields and/or templates made on the dev server with the live server is cumbersome. At the same time, there is no version control of fields and templates, which some folks (including myself) see as a disadvantage of ProcessWire. A way to have version control to track changes and replicate automatically would be desirable. There is the template and fields export feature in ProcessWire which has said for ages that this is only a beta version, although I have used it many times without any problems. However, even with this method, it is very cumbersome to reconcile changes between dev and live. You have to remember which fields / templates you created and select them, then copy and paste them on the dev server. This is a manual, cumbersome and time consuming process. Existing solutions: For this reason, several solutions have been developed such as: Migrations by @LostKobrakai https://processwire.com/talk/topic/14603-rocksvn-brings-version-control-to-your-fields-templates/ ProcessWires Template's and field's export function https://processwire.com/modules/rock-migrations/ https://processwire.com/talk/topic/25307-oh-no-not-another-migration-module/ https://processwire.com/modules/auto-export-templates-and-fields/ Other systems like Laravel, Craft, Kirby and Statamic use configuration files (migrations, YAML) to manage fields / templates, which allow to create a state of fields / templates. Since the configuration is done in a file, you can of course manage it with git (or other vcs). By configuring in a file, it is also possible to automatically execute these migrations during a git push through different deploy pipelines like github actions, buddy, bitbucket pipelines and thus you have the desired state on the desired server. Where to go from here? In another post @bernhard showcased a prototype, that uses a YAML-file to create and manage fields / templates in ProcessWire. At the same time he showcased a YAML recorder which writes all changes that are made to templates and fields into a YAML file, which looks very promising. I think a combination of a recorder and a YAML config file would be a optimal solution, at least for me. What format to use for such a configuration file was and has also to be discussed: Update 30th September 2022: Until we might have a native method for migrations, I encourage you to checkout the great RockMigrations module. With the module you can have one or multiple migration files, that handle all the stuff mentioned above, like adding fields, adding templates, creating pages with content and setting roles. As the migrations are file-based they are also version-controllable. This makes it easy to work on a feature in a different branch which requires to have other fields/template than in the main branch. Now you can switch between branches and always have the required fields and templates. This is a huge time and workflow improvement. @bernhard steadily improves his module, and me and other contributors try to enhance it, or give feedback.1 point
-
I still use it. I do have one workflow thing I do where I add a "keyword list" textarea field below the keywords as the SEO tool we use to generate lists of keywords for subjects spits them out one per line, so we copy and paste that into that textarea and on save I turn it into a CSV string and put it in the proper keywords field. Sounds a bit lazy but one site had hundreds of articles. I may also need to build a Y0ast-like page score module at some point soon too, though I think those things can be misleading as much as they can be helpful.1 point
-
I haven't had a chance to dig into it yet but according to a recent weekly PW newsletter it's a new module @bernhard is working on: https://github.com/baumrock/RockSeo1 point
-
Please note that Padloper 2-related pre-sales support has been moved to its own sub-boards in the open forums. Please read the pinned topic 'About this Board' in the board. Thanks. https://processwire.com/talk/forum/62-padloper-pre-sales/1 point
-
This is a temporary board for Padloper 2 pre-sales issues. Is is intended for general pre-sales questions and more specific Padloper 2 topics such as technical/coding questions, bug reports, documentation, feature requests (wishlist) or anything related to Padloper 2. For paid support for Padloper 1, please continue to use the existing VIP Support Board. This open board for Padloper 2 is necessary as it allows non-Padloper 1 users access to a support forum. Please note that once Padloper 2 is officially released, these boards will likely be merged into one. VIP Support will continue but it may happen in an open board with priority given to those with active subscriptions. Padloper 1 topics would be archived (but accessible). Thanks.1 point
-
I had already suggested to @kongondo that he could use Omnipay Library as part of the Padloper module. But I don't know if this Library is a good choice, since no one here in Processwire has ever implemented it as a module.1 point
-
Yes, this is the exact reason why I asked about it. In its current state it's not even as complete as Padloper 1 so the most I could do is playing around with it. And that would not be a proper beta test I'm afraid. It's been years since I last used PayPal for anything so Stripe is a must have on my list, I'm not so much into custom solutions though...1 point
-
https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#trash-for-all1 point