-
Posts
394 -
Joined
-
Last visited
-
Days Won
10
Everything posted by BrendonKoz
-
Because ProcessWire is so configurable, content can come from many different places, such as: The page tree Language translation files Site template files 3rd party services / APIs / Webpages An external database/application This is entirely dependent upon how that section of the website was built, and since all we can see here is a photo representation, we can only guide you through an overview of your options. This isn't a situation unique to ProcessWire - other CMSs, such as WordPress, would also suffer similar issues, depending on how plugins were used, and how the plugin authors implemented their modules. As for your specific question: "Is it possible that I am not seeing the whole tree?" That depends on your account's access level. It also depends on whether there are sections hidden within the Admin node in the tree. Is there any additional information that you can provide in relation to this page, and the "following text" that you wish to edit?
-
I (very thankfully) haven't experienced this issue. I've not attempted running PW on Digital Ocean as of yet though. Out of curiosity, are you using droplets and if so are they of the same type on the hosts you've experienced this with? Curious (and concerned) if you've yet discovered a culprit and/or resolution.
-
Yeah, I've tried both scenarios (one without the file extension, and one with). I've tried multiple browsers, incognito/private windows. I haven't tried a different PC altogether (which I now will). It's such a simple thing, for it to not work is kind of weird. I checked my htaccess files and all uses of header() just in case, too. I'll try to see if I can capture the headers sent by my webhost, if they're any different.
-
URL Segments that match a child page name
BrendonKoz replied to BrendonKoz's topic in General Support
I know that I could disable url segments and create an htaccess rule to handle the scenario myself, and in fact I have come up with a workaround that solves the issue that I was having (though without child page name matching). It wasn't so much that I needed this to work, I was questioning why or if it could work, and if I just misunderstood the documentation. 🙂 Thanks! -
URL Segments that match a child page name
BrendonKoz replied to BrendonKoz's topic in General Support
That's likely the part that I was getting caught up on, and what is happening. I was a little confused when I could query it successfully from a location that wasn't from the template that enabled the URL segment; I originally thought it wouldn't work at all...and the fact that I was able to actually process the request from the PHP template file related to the parent (car-maker), it made me question the docs' in that it prioritized children that existed in the system (as that would seemingly immediately render a 404, and not even show processing from the parent -- i.e.: if I try accessing car-maker/mazda, the car-maker template is being processed, at least initially). Thanks, @Robin S! -
I've run into a bit of a confusing mess. I have a particular section on our site that, for various reasons, I chose to display dynamically by pulling the child page content and displaying it on the parent page. Think of it like the following: Car Maker (page ID: 2185): General Motors Mazda Ferrari Byd So General Motors' information is only accessed by viewing the "Car Maker" page, and passing an appropriate url segment value...in this case, the child's page ID. (The children do not have their own PHP, file-based template.) I wondered though, in this case: Why can't I match either the ID or the name? So I tried it. It works when querying in Tracy's console. $maker = pages()->get(2185); $maker->child('id|name="mazda"')->title; It does not work on the "Car Maker" template itself. ProcessWire returns an instance of NullPage. I'm not entirely sure why Tracy is able to discover the page, while the PHP file template associated to the PW template with URL segments applied cannot... Thoughts? I do have a workaround to bypass this issue, though my preference would be to allow this to work instead of using my workaround behavior. 🤷
-
Multiple images field: only the last image is saved in DB
BrendonKoz replied to theoretic's topic in General Support
I agree with bernhard that testing with a simple, undeveloped installation with only a multi-images field configured would be a good test. If your host uses mod_security and has made any customizations to it, that could potentially be an issue too. (I use Dreamhost and there are multiple issues with its configuration of mod_security and ProcessWire.) Are you running Apache or NGINX? Were there any JavaScript console errors during the interactive process? (I know you mentioned to error during the upload, but unsure what errors your had checked; system logs or JS console or both.) -
I'm testing this module to see what it can do; I haven't before used PageTable in any way prior. I used the image in the module's directory entry as an example of how to configure the naming of things, so I created the default field of "ptn" from the module config, then created a PHP template file (in the root template directory - I wasn't originally clear on where it needed to go) with a filename of "ce-header.php" (with fields "title" and "number_01" which would be used to denote the heading level such as h1, h2, etc.); I created a template within PW with the same name. Upon loading the field to add the content element (page) template, it said it couldn't find the template, but told me where the file should be placed. ✅ So that structure is now as shown below: When trying to use the field template, I was uncertain of how to go about referring to the properties (fields) held within the PW template in the PHP field PTN template file. I ultimately discovered that I could access it via the following ... but is that the correct way? <h<?=$page->ptn->['ce-header'}->number_01 ?>><?= $page->ptn->{'ce-header']->title ?></h1> PHP property names with hyphens have to be escaped with the syntax as shown above ( {'property-name'} ) but that's due to using the image as shown on the module description page as an example; this could easily be changed on my end. But is that truly the way I should be referring to the property in the PHP field template file?
- 15 replies
-
- fieldtype
- inputfield
-
(and 2 more)
Tagged with:
-
Hey @TomPich, I don't know if you gave it a try, but I just did. Although I was able to get the button to work after manually modifying InputfieldTinyMCEConfig.php, I wasn't able to get it to actually work using the default interface of a Textarea field's Input config for TinyMCE fields. As the Accordion plugin is not an external plugin, there doesn't seem to be a simple way to use the UI of the field's Input config settings to enable the accordion. I played around a bit, and did get it to work, but after saving the injected "accordion" (details/summary elements), the HTML of those elements got stripped via HTMLPurifier, so there's another problem. Turning off HTMLPurifier allowed it to work, though I'm not sure if you'd want to do that. There's another recent topic where someone is attempting to adjust HTMLPurifier a bit. Currently, it seems that to get the Accordion plugin to work until/unless the core TinyMCE module is updated to include it, you'd currently have to migrate your customized settings via the field's UI into a custom JSON that overrides what you have set via the field UI. Example "Custom Settings JSON" (PW default + accordion): { "plugins": ["anchor", "code", "link", "lists", "pwimage", "pwlink", "table", "accordion"], "toolbar": ["styles bold italic pwlink pwimage blockquote hr bullist numlist table anchor code accordion"] } After playing around with the accordion interface, I don't find it quite as intuitive as some other elements, but it does work.
-
TinyMCE media plugin in combination with purifier does not work
BrendonKoz replied to Didier B.'s topic in General Support
I was curious so just tested the default configuration of using the TinyMCE field with the media plugin enabled, and I was able to get it to save a YouTube and/or Vimeo video within the editor (and view it successfully on the frontend) without adjusting HTMLPurifier. However, if I re-save the exact same page, after saving it once, the content then disappears. Something must be changing just enough that's causing it to get wiped, though I haven't dug down to see what. I think most have taken advantage of either hannacodes, Ryan's Textformatter Video Embed, or one of the two Oembed modules for this. It's not quite as convenient as simply using something that exists natively within the TinyMCE editor, but it may be a viable workaround if a better solution can't immediately be found. 😞 -
Have you already added the plugin into the InputfieldTinyMCE's External Plugin Files section, and then configured both the module and the field to use it? I'm just wondering if the module, and then field config would take care of your manual database edit.
-
I think there may be an error in the try/catch block when the FileIndexer attempts to index a file, and fails. That line points to $file_indexer['method'] as shown below: <?php // Attempt to read file data using file indexer try { $text = $file_indexer->getText($file); } catch (\Exception $e) { $this->log->error(sprintf( 'SearchEngineFileIndexer::%s error for file at %s: %s', $file_indexer['method'], $file_info['filename'], $e->getMessage() )); return null; } In a cursory search, I was unable to find a method property or name that reported the current indexing method type. I don't want to suggest a fix without knowing what the intended error log value was. In this instance, the file also failed to properly upload/save. I don't know if it's because of a server configuration or if the search indexing ended up being a blocking behavior. I suspect it's the fault of the server, but identifying the error is difficult since this was the only error reported.
-
Request for Input: What features should a PW calendar module have?
BrendonKoz replied to bernhard's topic in Modules/Plugins
Appreciate the gesture, @bernhard, but I know how difficult it can be to work with recurrence and all of the edge cases therein. Even if just for testing, I'd rather pay you for your work! 🙂❤️ Catching up on life right now, but saw you posted the intro video, hope to watch it soon! Not sure I can immediately use the module, but excited to test it out!! -
Error "Invalid Module Name" - Please assist
BrendonKoz replied to Greg Lumley's topic in Getting Started
Do you have any files (or folders) in your site/modules folder that start with a dot/period? If so, it should be safe to delete if it is causing errors. It looks like some files were renamed and/or placed in the wrong location...maybe? -
I'm still personally having trouble properly understanding the vision of where the problem is. SIA has seen the car example (at least one of them, there are a few). I understand that there are potential hierarchies of some sort of data, but how that data relates to individual plants/pages, to other levels within the hierarchy, and how SIA is envisioning the page tree to look, it's hard to make any recommendations. 😞 Maybe the first hierarchical level in the page tree is the CATALOG (version/periodical?). These are individual entries that are the (only?) allowed children of HOME. Allowed children of CATALOG would then be GROUPs (though I'm not sure what this is a group of or how it relates to CATALOG or CATEGORY). CATEGORY is next, so it's the only allowed child of GROUP. Since we're talking about PLANTS, I'm not sure what "Category" relates to within GROUP or how it is defined. I would think make genus, or species, or type of plant as defined by the organization (Annual, Perennial... Perhaps the hardiness zone? Seed or Bulb?) That's a lot of clicking to get to specific (plants?) items within the site, but it does limit the amount of difficulty in finding specific items within a page tree containing 10,000 items under a single node. ... There are ways that the above defined data hierarchy could be architected within ProcessWire so that it is not as rigid as mentioned. Fields used as attributes (ex: tagging) can go a long way here, along with what @Ivan Gretsky mentions in the Listers to offer secondary predefined navigation options to supplement the page tree. There's also the very powerful admin live search which can even be customized. That is extremely quick, assuming an item's title is already known. I would like to make clear that if you're more confident in your use of WordPress and already understand how you would build that site out using that tool, then it may be a better option for you. I'm trying to understand the more nuanced parts of this particular job request in order to give some possible suggestions of how ProcessWire could be used to mimic what you'd get out of WordPress as they can be, for most scenarios, used interchangeably (with the limitation on custom plugins and/or themes).
-
Good day, SIA. Some questions for clarification: "they will make transfers to each other" -- This may not have translated properly. Will there be multiple websites where data will be maintained and integrated into both, or is this referring to many people making edits to individual items/pages? "How would it make it easier for them to edit their 10,000 pages approximately?" -- ProcessWire has some options for various forms of access levels, whether it be page-level access, field-level access, or simple role-based access; you can also override with custom rules using PW's hooks. The question you asked though of, "how to make it easier," would depend on the needs of the project, how they expect to use it, and how you end up building that solution out. ProcessWire provides the basic options, but it's up to us to improve it per project using the tools that PW offers. Your "hierarchy" is flat. Were newlines removed in the paste? You provided a hierarchy, but what do you want to know relating to it and ProcessWire?
-
Would you expect a PW-related project to be build with ProcessWire?
BrendonKoz replied to wbmnfktr's topic in Dev Talk
If the question was never asked, I wouldn't have wondered. I do agree that if I discovered that a competing, comparable product was used instead of PW (such as WordPress) I'd be dismayed, but when the technical demands are different and a familiar tool seems like a better fit - no, I think that a lot of the decisions with ProcessWire is that simpler is often better and not to overcomplicate things: use the tool that you're familiar with that fits the solution best. If server costs were a concern and your home internet is stable enough, you could run a Raspberry Pi (5) as a webserver to run PW and MySQL inside of a Docker container and merge the backend with the frontend as flydev suggested. That seems like overkill simply to involve PW though? If there was a technical reason to use PW in the mix beyond what is currently offered, then that would be the time to do so! -
Unfortunately no. I wish I could have. I was trying (quickly) to find the article I had seen that covered the 4-5 different protocols that aimed to solve a similar goal. I was unsuccessful. It was well over a year ago, so I don't remember the names of the protocols (or the product[s] that were using them). I think one of them was Matrix, and maybe the other was BlueSky's AT...and then forks of those.
-
Hook processInputFile and processInputDeleteFile
BrendonKoz replied to cwsoft's topic in API & Templates
Looking at the code for processInputFile, it does seem to run against any changes to the field, including deletion, so in that regard it makes sense that it also runs when the ZIP archive file is being deleted. You might be able to get an InputfieldFile after hook to work against ProcessInputAddFile, but I think to be successful you'd have to examine the current method to get access to the values you need since the default method only accepts the filename as a parameter, you can't immediately get the pagefile. Maybe that was the issue when you tried to use it as a hook previously? -
Have the federated protocols finally stabilized with a clear front-running winner? For a time there were competing protocols that various community software products were using, claiming their option(s) were better suited for various scenarios. One particular complaint over ActivityPub was server cost related to the bandwidth use of the protocol. I tried to quickly find a singular article that discussed the competing protocols but unfortunately was unable. I think the best source I found was a hackernews discussion thread, and/or Reddit, but Google's results was full of various Reddit discussions, none of which were what I had read in the past. (Seems newer conversations are comparing Mastodon, specifically, against ActivityPub.)
-
Hook processInputFile and processInputDeleteFile
BrendonKoz replied to cwsoft's topic in API & Templates
Just curious if there's a less PW-like way of dealing with this issue? Are you unpacking the archive, doing some processing on the extracted files, then deleting the files -- all in sequential order? If so, why not call the other methods from within each method/step of the process? That way you'd only need one hook, the other logic can be separated into standard functions/methods and don't need to rely on proper hook order. If that's not possible, I haven't checked to see if PW's file methods are non-blocking, but if they are blocking, then perhaps setting a priority order on the hook calls will suffice? -
Things I would consider trying first if I ran into the same problem: What is different between the current website, and a fresh installation of ProcessWire? (Can I take a DIFF of the core files [wire folder], index.php, and .htaccess?) Has the current website used any modules that attempt to capture 404 responses that is causing an issue? Are either instances being run from a subfolder, or are they installed in the root? Are they running on the same webserver (eg: NGINX vs Apache 2.2 vs Apache 2.4 vs Litespeed) Does the webhost have any services in use that might cause unexpected issues (ex: mod_security) If I were to check the web browser's debugging NETWORK tab, is there anything I can see different from when it shows the expected page vs when it does not? I'm sure there could be other things I could try too, but those are what I think I'd try right now.
-
Fuzzy search for leniency on spelling mistakes
BrendonKoz replied to joe_g's topic in General Support
Oooooooh, very nice! -
Fuzzy search for leniency on spelling mistakes
BrendonKoz replied to joe_g's topic in General Support
ProcessWire uses MySQL, and as such exposes, through selector queries, a limited (though quite decent) set of options for matching. None of these are truly fuzzy, as MySQL requires quite a bit of additional effort for that type of search result matching. Typically the solution for fuzzy searching is to use a purpose-built engine, such as ElasticSearch, Algolia, Typesense, or similar options.