-
Posts
384 -
Joined
-
Last visited
-
Days Won
5
Everything posted by gornycreative
-
Okay... Doublechecking it was in RepeaterMatrix items only. Nested maybe 3 deep. I will play around with it later this week if it doesn't affect you and I'll let you know if I find anything related to the module. I need to dig into how I can alter the pwimage selector in front-end editing to grab the imagefield from the item in a repeater field and not from the page where the repeater field is anyway so I will dig into that as well.
- 25 replies
-
- 1
-
-
- forms
- formbuilder
-
(and 2 more)
Tagged with:
-
Just Repeater and RepeaterMatrix - like I said the value is still in the database so it doesn't break anything. Could be a fieldgroup context issue I just haven't had a chance to look at the code to see.
- 25 replies
-
- forms
- formbuilder
-
(and 2 more)
Tagged with:
-
For some reason this doesn't recall selections in repeaters for me. I see valid forms in the dropdown, select one and save, but the setting doesn't return to the form - the select element is stuck at the blank default. On the backend, however, the selection is saved to the database.
- 25 replies
-
- forms
- formbuilder
-
(and 2 more)
Tagged with:
-
That makes sense. I'll look for more hookable stuff - I always forget to do that for mods.
-
My reason for looking into this is for things like a style block selection or a font selection - it would be great to be able to show an image below the selection instead of text. I'm not sure how well it would work for tooltips.
-
I like what this does a lot. Have you considered allowing an image field to be selected and using, say, a thumbnail of the first image in the field to be shown?
-
module PrivacyWire - Cookie Management & async external asset loading
gornycreative replied to joshua's topic in Modules/Plugins
I haven't dug too deeply into this yet, but is I saw there is supported integration with TextformatterVideoEmbed - I'm wondering if this could apply to either TextformatterOembed / FieldtypeOembed postprocessing as well, or if that requires more fine tuning because of how different providers may offer different embedded content. Perhaps all of these fall under external-media? -
Theo_gg had a really solid take that I believe is applicable to many disciplines being threatened by the AI incursion. If you need an excuse to stop coding, Devin is more than willing to provide you with that excuse. If you don't want to stop coding, Devin will absolutely not take away the need for you to provide innovative and custom solutions. AGI may be more of a threat, but still - we are at a point where AI is able to teach and perform things for people that someone already knows how to do. And you can get really far with this, but it is not the endless threat. Think about how valuable it will be as part of the singularity to be exposed to every post on Twitter. There's a lot more junk than AI knows what to do with at this time. Once that changes, life is going to get interesting. It will be different. I don't think people will be interested in having their freedom curbed because a machine is better at determining their motives and endgame than they are. I say this as someone who has worked in business intelligence, where this comic ABSOLUTELY indicates how interested people are in giving authority to numbers and facts:
-
Cannot bootstrap index.php & run via PHP CLI?
gornycreative replied to hellomoto's topic in API & Templates
This thread and tool may help you out: -
I have a site structure with repeaters that contain page select fields, and then I am outputting the content of those page fields in a hierarchical layout. I'd like to allow users to edit the content on the front-end, and for general text editing this works fine. The changes are saved to the original page, and wherever that page is inserted elsewhere in other layouts the changes are reflected. When I try to insert an image into that page where no images exist, the system tries to use the layout page where the repeater is, rather than the page selected whose tinymce is being edited. So I have to navigate the page tree down to the original page being entered into the tree. In most cases it would be redundant to pass an id to the page image select process because you are likely editing the content from the page url - so the url test works. But could that ID also get either passed or tested so that pages rendered as parts of other pages can have their images added to/edited without navigating through the tree to the original?
-
SEO PRACTICE: How to insert json-ld structured data
gornycreative replied to franciccio-ITALIANO's topic in Getting Started
That's a great library. Thanks for sharing. -
SEO PRACTICE: How to insert json-ld structured data
gornycreative replied to franciccio-ITALIANO's topic in Getting Started
Yes. You can use php to output all sorts of content and processwire allows you to submit headers as well. But in your case, yes, you can use php and the API to output a json-ld structured data block. There's a module someone built already if you want to see examples, plus I think maybe RockFrontend includes a structured data option too? -
SEO PRACTICE: How to insert json-ld structured data
gornycreative replied to franciccio-ITALIANO's topic in Getting Started
Yes. I actually tie this in with custom page classes, because often the page class matches a structured content type. When I am building a site that is using a repeater block system, there are three 'tracks' of data that get pulled in: structured data, page data and presentation data. Usually structured data is a php file that outputs json. Page data is a php file that does whatever calculations I need for a content block and passes a special latte variable into the latte variable array. Presentation data ties together the structured data and bring in a special computed variable from the latte variables I have set. This way the structured data logic, data cleaning prep logic and presentation logic remain separate. -
Hello all, I was running into an issue where a particular repeater matrix structure failed to index properly. In a structure like this: Template Repeater Matrix Field Matrix Type Page Field Page Id Name Title Headline Body Summary So where you have a page template with 'zones' that allow you to place a matrix type that acts like a block with a page selection field in it to insert a piece of content, that deeper piece of content was not getting properly indexed no matter what indexed fields you set in place. In SearchEngine/lib/Index.php within the function __getFieldIndex there is a section that overrides the $indexed_fields array with a hard-coded array. In the version below I have commented it out and restored the $indexed_fields array and the referenced child page content for Repeater Matrix Types now indexes properly: /** * Get index for a single field * * @param \ProcessWire\Field $field * @param \ProcessWire\WireData $object * @param array $indexed_fields * @param string $prefix * @param array $args * @return array */ protected function ___getFieldIndex(\ProcessWire\Field $field, \ProcessWire\WireData $object, array $indexed_fields = [], string $prefix = '', array $args = []): array { $index = []; if ($this->isRepeatableField($field)) { $index = $this->getRepeatableIndexValue($object, $field, $indexed_fields, $prefix); } else if ($field->type->className() == 'FieldtypeFieldsetPage') { $index = $this->getPageIndex( $this->getUnformattedFieldValue($object, $field->name), $indexed_fields, $prefix . $field->name . '.', $args ); } else if ($field->type instanceof \ProcessWire\FieldtypePage) { // Note: unlike with FieldtypeFieldsetPage above, here we want to check for both FieldtypePage // AND any class that might potentially extend it, which is why we're using instanceof. /** $index = $this->getPageReferenceIndexValue($object, $field, [ 'id', 'name', 'title', ], $prefix); */ $index = $this->getPageReferenceIndexValue($object, $field, $indexed_fields, $prefix); } else { $index_value = $this->getIndexValue($object, $field, $indexed_fields); $index[$prefix . $field->name] = $index_value->getValue(); foreach ($index_value->getMeta(true) as $meta_key => $meta_value) { $meta_value = explode(':', $meta_value); $index[self::META_PREFIX . $meta_key . '.' . $field->name . '.' . array_shift($meta_value) . ':'] = implode(':', $meta_value); } } return array_filter($index); } I don't know if this was set in place for performance reasons, but if you are using a page template structure with page fields you may have run into this problem where in some cases only the content titles is included in the search_index output.. This change does extend the indexing timeframe, but pages are indexed fully.
-
What's the best consolidated jquery resource today in 2024?
gornycreative replied to gornycreative's topic in Dev Talk
Looks like now is a great time to dive back in! -
Automate Repeater Matrix types creation with RockMigrations
gornycreative replied to Ivan Gretsky's topic in RockMigrations
I will add it to the pile for more testing. I don't see the original problem stated in the question, just my weird related one? And I have been running the snippet in createField from our first discussion - so quite some time now. -
Automate Repeater Matrix types creation with RockMigrations
gornycreative replied to Ivan Gretsky's topic in RockMigrations
I'm not sure. The only time I get a Field returned sometimes is if I run a setMatrixItems call from ready.php and I'll get a Field::setMatrixItems does not exist or is not callable in this context error. -
Automate Repeater Matrix types creation with RockMigrations
gornycreative replied to Ivan Gretsky's topic in RockMigrations
Hey @gebeer remember this code that we added in our DMs? // this will auto-generate the repeater matrix template if ($field->type instanceof FieldtypeRepeaterMatrix) { $field->type->getMatrixTemplate($field); } elseif ($field->type instanceof FieldtypeRepeater) { $field->type->getRepeaterTemplate($field); } It didn't make it into the final PR I don't think. We inserted this at the end of createField. The original (and currently live version) only works for returning a FieldtypeRepeater I think. https://github.com/baumrock/RockMigrations/blob/be40ee6ae51a9f9f3ab9a9622d3acc12e069df5e/RockMigrations.module.php#L1092 -
Ajax-driven autocomplete search with native JavaScript
gornycreative replied to Stefanowitsch's topic in Tutorials
I believe SearchEngine is able to index content within repeaters and add it to the searchindex field it creates. https://processwire.com/modules/search-engine/ It can also return JSON so it may be a drop in alternative or work side-by-side with the FieldtypeCache? Regarding repeater detection and indexing: -
I'm trying to troubleshoot a rough bottleneck I haven't dealt with before. I've got extreme i/o spikes coming from pw/index.php and ajax calls are unusably slow. I've been building out a template system that makes heavy use of RepeaterMatrix. I've spent the last few days loading a pretty large number of matrixtypes that have a few fields each. I've turned off prodrafts and rockmigrations, trying to strip things down to a point where I can get reasonable speed out of it. I thought it might have been some of the plugins I installed recently (Media Lister, Dynamic Selects) but removing them didn't help too much. I'm used to dealing with CPU issues, not i/o I am not entirely sure how to go about it. The slowdown seems to be mostly on the backend.
-
Recently updated, alpha channels were rounding to integer rather than a float - now fixed. With the right arrangement, stacked gradients are possible.
-
What's the best consolidated jquery resource today in 2024?
gornycreative replied to gornycreative's topic in Dev Talk
I don't use a lot of JS in new stuff, it's the already existing stuff - especially old stuff I've done where I was sloppy and used things without necessarily understanding the ins and outs - a lot of that I have tried to transition into vanilla JS just because jquery was total overkill, but I still run into it often enough. using gen ai is a good idea though. I bet it does a nice job of suggesting alternatives if I want to pop jquery out too. -
What's the best consolidated jquery resource today in 2024?
gornycreative posted a topic in Dev Talk
So it's a funny thing. I started using javascript a lot when I was still doing 'classic' ASP because it performed better than vbscript server-side, and then I shifted over into PHP around the time when Jquery was picking up speed, and then I got back into javascript when jquery was starting to get unpopular (at least here in the US it went through an extended grumble phase) and so I was doing a lot of vanilla js stuff and then with node, react/vue etc... My jquery knowledge is not that great. I know enough to do repairs and some debug but now as I start to work more with client side stuff in PW I need to sharpen up. Is there a faster track than the straight docs anyone would recommend?