-
Posts
1,410 -
Joined
-
Last visited
-
Days Won
17
Everything posted by elabx
-
For this error, can you try changing your session handler?? In case you are using the default, try SessionHandlerDB?
-
Would you duplicate pages with matrix repeater content
elabx replied to tires's topic in General Support
I do this regularly with repeater matrix and even nested repeaters and it just works! -
Oh why does this happen? It worries me I might encounter this sometime.
-
@jploch no!! sorry for the confusion
-
I think for this specific "hierarchy" you might benefit from looking at AdminRestrictBranch and if it doesn't exactly fit your needs you'll get some ideas for hooks within it's code, although I understand you are new to ProcessWire but from the looks of your project you're in for a ride! Keep in the touch and welcome to the forums! So you might benefit from having various roles that fit the "branch" where you want to work on.
-
$pages->clone() not working as expected with recursive parameter?
elabx replied to bernhard's topic in General Support
I completely missed this syntax! I am living in the PHP of the past 😭 -
$pages->clone() not working as expected with recursive parameter?
elabx replied to bernhard's topic in General Support
I think $parent is the second parameter not the recursive flag (which is true by default)? 🤔 -
Did this thread cursed me? (jk) Monday first hour and I have a site that's going through very odd gateway timeouts 🤣 EDIT: Indeed, server load! PHP hits hard, always have a cache layer! 😄
-
Have you checked your server load? This is my most common case for this timeouts.
-
I know this is more of a Vite question, does anyone happen to know how to build a separate CSS file that can be used in TinyMCE or CKEdito, but in which I can reuse some of the CSS that is used on the "client facing" site, I am using LESS and it would be nice to just have buttons, headings and body font exported into the CSS file used by the text editors.
-
Character counter and max char settings - both not working?
elabx replied to Sebastian's topic in General Support
There is a bit of discussion about this here too: https://github.com/processwire/processwire-issues/issues/2032 -
TinyMCE media plugin in combination with purifier does not work
elabx replied to Didier B.'s topic in General Support
I struggled with this too, I didn't give it a shot but I thought of hooking the MarkupHTMLPurifier but I didn't find a reasonable point to hook into, maybe here? But would love to scope it to InputfieldTinyMCE. -
@adrian this looks oddly similar to what happened with the repeater matrix
-
My bad, hadn't noticed the .htaccess files, great idea!
-
Where would you recommend to place the Env folder? Is PW's .htaccess ready for it?
-
I have been using .env but only with phpdotenv, this looks like a step forward, thanks!
-
Try: $reference = $repeaterFg->get('field_as_reference') // Or insertBefore() $repeaterFg->insertAfter($field, $reference); $repeaterFg->save()
-
Check if there is an error on the console, this has happened to me when there is a javascript error parsing the console, sometimes happening when a PHP warning or errors gets attached to the response of the ajax file upload.
-
I have a site I'm maintaining where I observe this two queries, and the only difference being one field Avg. 0.005s pages.find(parent=1082,template=ad,city_id|cities=11669,ad_status!=1, sort=-created, sort=-verified, limit=21, get_total=count) Avg. 078s pages.find(template=ad, parent=1082, ad_status=1, sort=-verified, sort=-created, city_id=11669, created_users_id!=41, title!=test|Test, status<1024) Average times from ProfilerPro. Event though the second query has more fields, I can confirm that the presence of "city_id|cities" or selector is what's making the query at the top spike. Is there a chance anybody know how to do this OR selection comparable to the second query performance? I've checked my indexes (compared the current ones with a new install of processwire) and they seem to be ok. Maybe this is just a caveat of the OR-field selector?? EDIT: This seems to be at least around twice faster: Avg. 0.035s pages.find(parent=1082,template=ad,(city_id=11669), (cities=11669),ad_status!=1, sort=-created, sort=-verified, limit=21, get_total=count)
-
I have a route I want to throw a 410 status at it instead of 404, is there a way to do this right from Apache? I would bet you should be able to do something like this at the top of the htaccess file: RewriteEngine On RewriteRule ^some-url/some-path(/.*)?$ - [G] But it's not stopping and continues until the ProcessWire 404.
-
The correct answer is to use the attributes: { "title": "Buttons", "items": [ { "title": "Default Button", "selector": "a", "attributes" : { "class" : "uk-button uk-button-default"} }, { "title": "Primary Color Button", "selector": "a", "attributes" : { "class" : "uk-button uk-button-primary"} }, { "title": "Secondary Color Button", "selector": "a", "attributes" : { "class" : "uk-button uk-button-secondary"} }, { "title": "Link Button", "selector": "a", "attributes" : { "class" : "uk-button uk-button-link"} }, { "title": "Link text", "selector": "a", "attributes" : { "class" : "uk-button uk-button-text"} } ] }
-
So I realized I could use a custom json configuration file (very handy!) and added my style_formats like this: { style_formats: [ { "title": "Buttons", "items": [ { "title": "Default Button", "selector": "a", "class": "uk-button uk-button-default" }, { "title": "Primary Color Button", "selector": "a", "class": "uk-button uk-button-primary" }, { "title": "Secondary Color Button", "selector": "a", "class": "uk-button uk-button-secondary" }, { "title": "Link Button", "selector": "a", "class": "uk-button uk-button-link" }, { "title": "Large Button", "selector": "a", "classes": "uk-button-large" }, { "title": "Small Button", "selector": "a", "classes": "uk-button-small" } ] } ] } But the editor shows up like this: