schwarzdesign

Members
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

15 Good

About schwarzdesign

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. schwarzdesign

    Thanks Yeah we are really happy with the speed, despite using using 'only' the normal page cache ... I was planning to utilize caching for some of the overview pages (those pull in data from several other pages), but it wasn't even necessary in the end, definitely a pro for ProcessWire.
  2. schwarzdesign

    We recently finished a relaunch of the website of the consulting firm Engfer Consulting: engfer-consulting.de (currently only in German). Built with ProcessWire 3 and Bootstrap 4. Features Bilingual website (the English page is inactive at the moment, as the content is not ready yet) A strong, simple data structure for job offers and news, allowing for a custom search page and fulltext search Sectioned content-blocks built with a Repeater Matrix (ProFields) Reusable components available as page reference fields Automatic generation of open graph-tags, with manual overrides available on each page Contact forms with a custom recipient depending on the current page Modules used: ProFields ProForms Sitemap Cookie Management Banner Duplicator Tracy Debugger Wire Mail SMTP Admin Links in FrontEnd Technical insights Most of the content is built using a Repeater Matrix field. Each section has an optional heading and a select-field for background colors. Some of the sections available include: Text blocks (a repeater-field for multi-column text) Feeds / listing of the latest job offers or news (with a field to control the number of entries shown) Displaying a team member or quote (selected through a page reference field) Downloadable files (a multivalue field for file uploads) Those sections can be combined and stringed together arbitrarily, so any number of page templates showing different contents can be built. The job offers template, in contrast, features fixed fields for taxonomy assignment, description, contact person, preview image and so on, making the job offer pages uniform and easily accesible. The (technically) most interesting part of the site is the job overview page, which contains custom filters that are automatically generated from the available taxonomy terms. The stylesheets are written in SASS, built with Bootstrap 4. Only the base and grid SASS files of Bootstrap are included, along with the Bootstrap components that we ended up using. Using Bootstrap 4 as a framework in this way makes development & styling blazingly fast, once all the utility classes are commited to muscle memory ... > Our Agency. Screenshots
  3. schwarzdesign

    @jmartsch Thanks for the suggestion, unfortunately that didn't help ...
  4. schwarzdesign

    Quick question, the automatic backups through LazyCron aren't working for me. Manual backups are working fine (both locally and with remote FTP backup), but the automatic backups won't trigger at all. Here are my settings: Backup mode: LazyCron - Triggered by a pageview (installed) Event trigger: 1 hour Remove backups older than: 1 year I have waited for several hours, the site had traffic during that time, and I also visited some pages as a logged-in administrator and as an anonymous visitor. But no backups occured, there are also no log entries at all, so it doesn't look like it just bugged out. Do I need to configure anything else? LazyCron is installed, it doesn't have any module options though. Or do I need to manually call the LazyCron hooks in ready.php or something like that? Not sure what I am missing. Thanks!
  5. Ok, I couldn't figure out a way to do this with only selectors, so I built a custom solution. In case anyone has the same problem, here's my approach: I created a hidden text field "offer_taxonomy_cache" and hooked a function after the saveReady hook to automatically populate this field with a space-seperated list of the values of the selected options for the fields that I want to search, in both languages. This is somewhat crude, but has the advantage that it's even more performant than using the select option fields themselves, as this way only one table has to be searched for matches. It's basically the same idea as the FieldType Cache core module, but this one didn't work for me, since it only saved the ID's of the selected options, leaving me with the same problem. Here's my code: // /site/ready.php /** * Write taxonomy values to the cache field. */ $pages->addHookAfter('saveReady', function(HookEvent $event){ // page to be processed $page = $event->arguments(0); // only hook onto job offers if ($page->template->name !== 'job_offer') { return; } $page->of(false); $user = wire('user'); // all the fields to be included in the text cache $fields_to_cache = ['offer_area', 'offer_sector', 'offer_region', 'offer_rank', 'offer_type']; $taxonomy_cache_text = ''; // loop over all fields foreach ($fields_to_cache as $field) { $fields = $page->get($field); // save the current language for later $current_language = $user->language; foreach (wire('languages') as $language) { // set the user language and loop over all selected options, then // add the title in the current language to the taxonomy cache text $user->language = $language; foreach ($page->get($field) as $option) { $taxonomy_cache_text .= ' ' . $option->getTitle(); } } // reset the language $user->language = $current_language; } // trim the leading space $taxonomy_cache_text = trim($taxonomy_cache_text); // write the value to the cache field of the page $page->offer_taxonomy_cache = $taxonomy_cache_text; // write a log message wire('log')->message("Wrote taxonomy cache for page {$page->title} ({$page->id}): \"{$taxonomy_cache_text}\""); }); One problem with this is the triple nested loop, so this might become quite slow for sites with many languages, select option fields and options per field. But in this case using a real page for the select options would be preferable anyway, as suggested. Thanks @dragan for your help!
  6. @dragan Thanks for the reply! I do have some select-options on the filter page, but I need those fields to be searchable through fulltext search unfortunately. I have used the value|title approach, but since I need to support fulltext search, searching the values instead of the titles is not an option. I'll probably use pages from the start the next time, but for now I have to work with what I got. Regarding @heldercervantes's comment, I actually found a solution to that. Turns out that while the magic getter for $field->title and $field->value always return the default values, the proper methods $field->getTitle() and $field->getValue() return the correct values in the current user language. I did post a reply, it never got accepted though .. Still, I'm not sure how to get this fulltext search to work with the current setup.
  7. I'm looking for a way to search multilanguage titles in a couple of select option fields. I have looked through some threads here but couldn't find a solution that works for my specific problem. Any help is very much appreciated! My setup: I have a multilanguage site with two languages, English and German. The default language is German. I'm building a search form for the template "job_offer" that has a couple of category fields. Those fields are built with the Select Options FieldType Module. They are categories for the region, industry, department et c. for the job offer. They have titles defined in German and English. For example, for the field "offer_region" there are the options "Austria", "Switzerland" and "Germany" that have the German country names as their German option titles. The search field is supposed to search for text matches in the job description and category field titles. This is the selector is have so far: $pages->find("template=job_offer, title|offer_body|offer_region|offer_rank%={$input->whitelist('search')}"); While the selector works for the title and offer_body fields, it only matches the German Select Option titles. For example, there's a job offer with the area set to "Austria" ("Österreich" in German). When I search for "Österreich", it shows up as expected. However, when I search for "Austria", I get know results, regardless of whether the current user language is English or German (note that the default language is German on this site). Any ideas how to get it to work? Ideally, I would like to be able to filter through the Select Option titles in every language, i.e. I get the same results when I search for "Austria" or "Österreich" regardless of the current user language. However, for the moment I would be happy enough with a solution that will yield a result both when I search for "Austria" (while the user language is English) and when I search for "Österreich" (while the user language is German). Thanks in advance!
  8. schwarzdesign

    @Soma It's a multilanguage textarea field; the field is one field in a Repeater Matrix type. There are multiple Repeater Matrix items of that type on the page, so there are multiple instances of the field on the same page (this is why it's running in inline mode).
  9. schwarzdesign

    @dragan I'm not sure it's related, as the Github issue mentions the allowedExtraContent settings string to be missing from the source code. In my case it appears there correctly, only the id-attributes are still being filtered. @Robin S Is the id still there after you have saved the page? For me, it only disappears after I've saved the page. Come to think of it, doesn't CK Editor apply filtering after you close the source editor? In that case, maybe it's not an issue with CK Editor at all, but some other filtering applied by Processwire .. the id only disappears after I save the page.
  10. schwarzdesign

    I need to allow the id-attribute for the <a>-Element, but I can't seem to get it to work. I have tried setting the extraAllowedContent in the backend: a[!href,id]; I have also tried using the line without the semicolon, no effect either. I have tried setting the extraAllowedContent in the /site/modules/InputfieldCKEditor/config.js file instead as well: CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.uiColor = '#AADC6E'; config.format_tags = 'p;h3;h4'; config.extraAllowedContent = 'a[!href,id];'; }; But that didn't work either. I have verified that the javascript-settings on the edit page include that line: "InputfieldCKEditor_body_block_text": { "baseHref": "/", "contentsCss": "/wire/modules/Inputfield/InputfieldCKEditor/contents.css", "extraAllowedContent": "a[!href,id];", "extraPlugins": "pwlink,sourcedialog", "removePlugins": "image,magicline", "toolbar": [ [ "Format", "Styles", "-", "Bold", "Italic" ], [ "NumberedList", "BulletedList", "Blockquote" ], [ "JustifyLeft", "JustifyCenter", "JustifyRight" ], [ "PWLink", "Unlink", "-", "HorizontalRule" ], [ "Sourcedialog" ] ], "format_tags": "p;h3;h4", "language": "en", "entities": false, "uploadUrl": "", "pwUploadField": "", "pwAssetPageID": 1167, "height": "20em", "stylesSet": "engfer-styles:/site/modules/InputfieldCKEditor/mystyles.js?nc=1529934076", "customConfig": "/site/modules/InputfieldCKEditor/config.js?nc=1530805498" } But every time I save, the id i add to a link in the source panel disappears. No idea how to debug this or what else I can try. Here are the rest of my settings for that field: Editor Mode is Inline (I tried switching to regular mode, doesn't work either). Use ACF is On Use HTML Purifier is On Any help is very much appreciated.