Jump to content

elabx

Members
  • Posts

    1,410
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by elabx

  1. For this error, can you try changing your session handler?? In case you are using the default, try SessionHandlerDB?
  2. I do this regularly with repeater matrix and even nested repeaters and it just works!
  3. Oh why does this happen? It worries me I might encounter this sometime.
  4. @jploch no!! sorry for the confusion
  5. 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.
  6. I completely missed this syntax! I am living in the PHP of the past 😭
  7. I think $parent is the second parameter not the recursive flag (which is true by default)? 🤔
  8. 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! 😄
  9. Have you checked your server load? This is my most common case for this timeouts.
  10. 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.
  11. There is a bit of discussion about this here too: https://github.com/processwire/processwire-issues/issues/2032
  12. Instead of setting the repeater parent page "for-field-{$f->id}", can you try calling: $f->type->getRepeaterParent($f);
  13. 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.
  14. @adrian this looks oddly similar to what happened with the repeater matrix
  15. My bad, hadn't noticed the .htaccess files, great idea!
  16. Where would you recommend to place the Env folder? Is PW's .htaccess ready for it?
  17. I have been using .env but only with phpdotenv, this looks like a step forward, thanks!
  18. Try: $reference = $repeaterFg->get('field_as_reference') // Or insertBefore() $repeaterFg->insertAfter($field, $reference); $repeaterFg->save()
  19. 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.
  20. 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)
  21. 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.
  22. Just as the title says, I am getting a mismatch between these counts, I decided to drop the ProcessWire one since it doesn't update on typing.
  23. 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"} } ] }
  24. 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:
×
×
  • Create New...