-
Posts
301 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Kiwi Chris
-
Some people think that anyone who works in any form of IT is made of money, but sadly it's not always the case. I know the feeling about dying laptops. About a year ago, when it was just over 3 years old, the motherboard on my laptop died. Fortunately I was able to track down a replacement part on Ebay, and after carefully removing a lot of screws, swapping over the CPU and heatsink, and convincing Windows that I wasn't running a pirated copy, I managed to get up and going again. My desktop is a bit long in the tooth too, but since I upgraded the hard drive in my laptop and added an external screen and keyboard, the desktop tends to get less use now, although it was a lifesaver when I needed to get online to order the replacement motherboard for the laptop, and do some work while I waited for the part to arrive.
-
I could use a field like this. I have a directory of local businesses and non-profit organisations, but sometimes their websites change or they go out of business, so it would be really handy to be able to run an automated script that can either hide or un-publish any listings that don't have a valid address. That would save on manually checking every one on a periodic basis to make sure they still exist. Of course I'd probably still double check manually any that get deactivated before removing them, but it would make the process a lot more efficient.
-
A number of field properties can be specified on a per-template basis that override the field definition. For example it is possible to set minimum and maximum length for text fields, so that it is possible to use the same field on several different templates, but with some different specifications on different templates. It would be nice to be able to do this with image fields, as sometimes I've found I've needed to create multiple image fields simply because on different templates I want to enforce different maximum dimensions. I'm not sure how complicated this would be to implement, but in some scenarios it could potentially cut down the number of fields required quite substantially.
-
I've managed to resolve the problem. I actually still think the issue might be a core ProcessWire one, but at least I know how to fix it now. Yes, I'm using the PW3 branch of Padloper, and it's working fine on other sites on my WAMP setup. I'm using AIOM+ on many sites with PW3 and it's working fine on all the others. I tried manually deleting all the entries in the cache table in phpMySQL and that allowed me to get into the site admin again temporarily, although it gave some notification about some modules that actually are present not being installed. I went to modules, and did a refresh, and the error came back. One thing I noticed that I wonder about, but don't know enough about how Processwire handles loading modules, is looking at the Modules.site/modules/ entry in the cache table, the modules seem to be listed in alphabetical order, and the offending module that is generating the error is listed before the module that it depends on, which it claims can't be found. I'd hope this shouldn't matter, as it could have serious implications for module naming, as the offending module was working previously, but it seems it does. I manually edited the order of the modules listed in the cache entry via phpMySQL, and the error went away. I've tracked down the issue with AIOM+ I think. There was a namespace conflct in that a reference to a root PHP class was picking up the ProcessWire namespace and obviously not working. I think I must have added a namespace statement to the module so that the module compiler didn't have to do it, but forgot to check any possible conflicts. The good news is AIOM+ works fine without namespaces in Processwire 3.x I think the AIOM+ problem might have actually been a red-herring with me trying to add namespaces to everything to try to get the first error to go away. The real culprit here is that if the Modules.site/modules/ gets regenerated somehow, it seems it can potentially break a site, as it will add modules in alphanumeric order, and if a module depends on another one that comes later in the sort order, then the class will not be found. This can be fixed with careful naming of modules so that a module that has dependencies will always be listed after any dependencies, so in the case of PaymentInvoice, since it depends on PaymentModule, it probably should have been called PaymentModuleInvoice which would ensure that regenerating the modules cache would always load it after PaymentModule.
-
Further development: I tried deleting the module that said that it couldn't find Payment Module. That solved that error, but now AllInOneMinify module is giving a similar error saying that it can't locate a class that it depends on, even though nothing has changed. Other sites on the same development server are working fine. This has certainly shaken my confidence a bit in the robustness of Processwire, if seemingly at random, it starts throwing out errors about a whole range of supposedly missing classes that are definitely there, and it seems a bit random, as why does it report certain classes missing but not others?
-
I'm having an odd error similar to this: I'm running WAMP on Windows 10, with Processwire, and get an internal server error trying to access either the front end or admin. Checking my logs I find: Error: Class 'ProcessWire\PaymentModule' not found (line 3 of ...\processwire\site\modules\PaymentInvoice\PaymentInvoice.module) The PaymentModule classs definitely exists, and hasn't been modified, and is namespaced. The other thing I've noticed, is in the modules.txt log usually modules are installed via the site admin, however just before I started getting the error, I see a reference to a new module being installed via access to a frontend page via the following code. $checkout = $modules->get("PadOnePageCheckout"); $checkout->setShippingModule("ShippingFixed"); $checkout->setPaymentModule("PaymentStripe"); // This module was not installed at the point the page was viewed, triggering the module to install. Normally, following module installation, there is an entry in modules.txt saying Saved module info caches. In this case there is no entry for this. The module that installed via the front-end extends the module in question that is supposedly missing. Before the whole site went down, I noticed that the PaymentStripe module was not showing as installable or installed modules, in admin, however it is not this module that is claimed to be missing, but PaymentModule which it extends, and it is another payment module, PaymentInvoice that generates the error. The site was working, although PaymentStripe wasn't showing up in the modules list, until suddenly everything stopped. I'm using the premium Padloper shopping cart package, however I understand payment modules can be used independently of Padloper, and I'm not sure the issue actually relates to Padloper directly.
-
I'm on PW 3.0.104 and having the same problem.
-
Module Profile Export module (also upgrade PW 2.0 to 2.1)
Kiwi Chris replied to ryan's topic in Modules/Plugins
The current version of ProcessExportProfile module seems to be having issues with not populating data in the exported SQL correctly. I'm getting errors like: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created' The problem seems to be here: CREATE TABLE `modules` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `class` varchar(128) CHARACTER SET ascii NOT NULL, `flags` int(11) NOT NULL DEFAULT '0', `data` text NOT NULL, `created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `class` (`class`) ) ENGINE=MyISAM AUTO_INCREMENT=188 DEFAULT CHARSET=utf8; The timestamp value that is exported is an invalid value with mySQL 5.7.14 that I'm using, so the import fails with the mySQL error. There also seem to be a whole lot of records (ie all the core modules) like the following which also fail on insert: INSERT INTO `modules` (`id`, `class`, `flags`, `data`, `created`) VALUES('1', 'FieldtypeTextarea', '1', '', '0000-00-00 00:00:00'); Modules that I've installed myself work fine as they have a valid date. Exported profiles did work in the past, so I'm not sure if this is a Processwire issue, or different mySQL configuration that's being more strict about date formats. -
Thanks. I hadn't spotted that module before, or maybe hadn't quite realised what it did. It's exactly what I was looking for.
-
Welcome to Processwire! I inherited a club website built in Concrete 5, and it was so slow that page loads were taking over 20 seconds. The way the site had been structured wasn't particularly intuitive either. I'm not sure if it was a Concrete 5 issue or poor implementation, but after I converted it to Processwire, I had a dramatic improvement in page load times, and found the page editing was far more intuitive to the point I could hand over day-to-day editing to non-technical users, whereas the previous webmaster, even with several years using the system and some technical knowledge, still ended up making mistakes on Concrete 5. Processwire passed my '1/2 hour test', ie by looking at the documentation for no more than 1/2 an hour, I was able to have enough of an understanding of the system to start customising sites. As a developer, a 2 minute install is nice, but if it then takes hours to understand the structure of the system to start customisation, then it's not great.
-
This is quite an old thread, but I've just come up with a requirement for similar functionality. This would be hugely useful functionality to have. Any update on this, and compatibility with Processwire 3? I've had a look in the modules directory under field types and can't see anything?
-
Released: PadLoper (commercial eCommerce platform for ProcessWire)
Kiwi Chris replied to apeisa's topic in Modules/Plugins
Same. I've been looking for the support forum, but this is the closest I've got. -
I have added an additional field called price, which starts with a $ symbol. Every time the page is saved, whether or not there is an output formatter set, an additional \ is added in front of the $ symbol, so if you save say five times you end up with \\\\\$
-
On PW 3.0.92 on my production server with Maria DB 10.2.12 I get the following error when trying to save a page with the fieldtype, even though all the fields have been filled out. Error saving field "businessHours" - SQLSTATE[HY000]: General error: 1364 Field 'data' doesn't have a default value On my WAMP setup with mySQL 5.7.14 it does work. I managed to create a workaround by manually editing the table design in phpMyAdmin and setting a default value for the data field to 0.
-
Unified Documentation Resource for Processwire
Kiwi Chris replied to Orkun's topic in Wishlist & Roadmap
That would be a good model. If only people with a certain level of contribution could post comments, that would likely prevent new users coming along and posting questions on the documentation site. Stack Exchange uses reputation based management to restrict some activities and responses I think, and the model works well there.- 11 replies
-
- 1
-
-
- documentation
- resource
-
(and 2 more)
Tagged with:
-
Unified Documentation Resource for Processwire
Kiwi Chris replied to Orkun's topic in Wishlist & Roadmap
I think one way possibly to encourage more unified documentation would be to allow user comments on official documentation like PHP documentation or MSDN. Currently it appears that there's no way to comment on official documentation, and that encourages fragmentation, as you either have to post in the forums or on another site. I understand moderation might be an issue, as questions belong in the forums, not in the official documentation, but user contributed examples and tips would make sense as comments with the official documentation. Comments allowing links could also refer to relevant threads in the forums or external articles to avoid having to reinvent what's already available. The official modules directory already allows comments, so presumably it wouldn't be too hard to add something similar to documentation?- 11 replies
-
- 2
-
-
- documentation
- resource
-
(and 2 more)
Tagged with:
-
It would be nice if the installer treated site profiles installation like module installation. Currently it will pick up any profiles in the appropriate directory, and I use the export site profile module to create my own for reuse. Modules work this way too by scanning the modules directory, but also offer the option to install by providing a module class name to download from the official modules directory, a URL, or an upload. Of course modules are installed like this after the base Processwire installation is already configured, whereas site profiles need to be chosen at install time, however if functionality were similar for site profiles, this would allow for both offline and online installation, and allow the included profiles to be kept to a bare minimum.
-
I watched that video posted in another thread, and afterwards made sure that all my sites were running on PHP 7.1 It seems to have made a significant improvement to performance.
-
I haven't used Atom personally, but looking at the documentation, the PHP plugin looks like an early release and it doesn't mention debugging, but VSCode seems to support full debugging. Someone who's used Atom may be able to comment regarding debugging.
-
Development: FieldtypeFloat - FieldtypeDecimal
Kiwi Chris replied to kixe's topic in Modules/Plugins
@szabesz any progress on this? Decimal is a fundamental data type of most dialects of SQL for the reasons that have been outlined in this thread. Over three years and it's still not in the core seems to be a rather long time for what should be a standard fieldtype. It's great someone has done a third-party module, but it would be nice if it were in the core. -
If you want a free IDE with code completion and conditional breakpoints, it might be worth trying Visual Studio Code. It's considered more an editor than a full blown IDE, but it supports intellisense (Microsoft's version of code-completion) and It's cross-platform, and unlike Netbeans, it does support Xdebug's conditional breakpoints and quite a bit more. I think the full-blown Visual Studio supports PHP debugging too, but Visual Studio is a bit of a monster and Windows only, so you probably need to be using it for other development already to justify it.
-
Unfortunaely no. Netbeans integrates with Xdebug which does support conditional breakpoints, but somehow it hasn't made it into Netbeans yet even though it's been a feature request for years. It seems like yet another open source project mismanaged by Oracle. Perhaps now Netbeans is moving to Apache there might be some progress on this.
-
I'm not sure if it's the 'best', but I use Netbeans, although the way Processwire is structured, some possible code completion isn't available, eg if you select a variable like $page, it can't give you a list of page fields, as they're defined in the database rather than in code. With some other CMSs where you have to define a page class for the equivalent of each template in Processwire, you'd get access to those properties. It's not a biggie, as I generally know what fields I've defined for a template. Netbeans has PHP documentation built in which can be handy.
-
You got me thinking. I do work as a single developer, but increasingly I'm finding I want to deploy solutions I've developed for one project to another, and just copying and pasting via the admin isn't ideal. I was having a look at Silverstripe recently, as I have a possible project where Processwire, though I'm sure can do the job, might meet some resistance, whereas Silverstripe will almost certainly be accepted as it's mandated as the CMS of choice by government here (NZ). What struck me is that you can do far more with Processwire with less coding, but in some cases defining data structures via coding rather than via an admin UI may be more appropriate for sharing code between projects or in the case of a team between team members. Processwire is perfectly capable of doing this as the admin UI is just a layer on top of the API, so there's no reason why fields and templates can't be defined programmatically in modules that are subject to version control. I notice that some of the existing modules actually consist of several dependant sub-modules, bundled in a common folder, so it would be easy to set up something like this with git version control. Silverstripe automatically rebuilds database schema by using a /build URL, however it doesn't remove unneeded fields or tables after a schema change, whereas the Processwire API makes it fairly easy to both add and remove fields via a module. Processwire will detect changes to a module version, and run any update process automatically, so even though it bypasses the ease of use of the admin UI, developing your database schema programmatically in modules might ease collaborative development.
- 6 replies
-
- 8
-
-
- deployment
- git
-
(and 2 more)
Tagged with: