Jump to content



Recommended Posts

No idea why is that - could you replace "$this->config" to "wire('config')" in that line?

Also what is the version of PW? If you can, could you check with a newer PHP? (eg if you can switch PHP version on the server via cPanel or other)

  • Like 1
Link to comment
Share on other sites

Changing to "wire('config')" was successful. The next "this"-error was on line 430 ( Using $this when not in object context). I changed the output to only "$disabledText" and now AOS is working on PHP 5.3.8 :-) Unfortunately, I can not switch to a newer PHP version on the server because there is still an old application running PHP 5.3.8.
Processwire is on latest Dev (3.0.40), but I think the error is because the old PHP.

Thanks for your support!

  • Like 1
Link to comment
Share on other sites

hi tpr,

i have an issue with your module in a panel frame. i created a demo process module so you should be able to reproduce it. just install the module, go to the hello world page and click "reply"

2016-11-13 13_33_12-Hello World • ProcessWire • hrdiamonds.dev.png

when i click into the field the first line is moved down and also there is some error on top

you can import the needed field here:

    "rocktodos_body": {
        "id": 148,
        "type": "FieldtypeTextarea",
        "flags": 0,
        "name": "rocktodos_body",
        "label": "Nachricht",
        "contentType": 1,
        "htmlOptions": [
        "icon": "align-justify",
        "inputfieldClass": "InputfieldCKEditor",
        "tags": "-RockTools -RockTodos",
        "collapsed": 0,
        "required": 1,
        "minlength": 0,
        "maxlength": 0,
        "showCount": 0,
        "rows": 5,
        "toolbar": "Format, Styles, -, Bold, Italic, -, RemoveFormat\nNumberedList, BulletedList, -, Blockquote\nPWLink, Unlink, Anchor\nPWImage, Table, HorizontalRule, SpecialChar\nPasteText, PasteFromWord\nScayt, -, Sourcedialog",
        "inlineMode": 0,
        "useACF": 1,
        "usePurifier": 1,
        "formatTags": "p;h1;h2;h3;h4;h5;h6;pre;address",
        "extraPlugins": [
        "removePlugins": "image,magicline",
        "textformatters": "",
        "showIf": "",
        "columnWidth": 100,
        "requiredAttr": "",
        "requiredIf": "",
        "toggles": "",
        "extraAllowedContent": "",
        "contentsCss": "",
        "contentsInlineCss": "",
        "stylesSet": "",
        "customOptions": "",
        "plugin_sourcedialog": ""


ps: seems that it has something todo with the getinputfield method and the id... don't know whats going on :(


Link to comment
Share on other sites

The edit field link is failing because I use a CSS selector "#ProcessPageEdit .aos_hasTooltip .title", so it is not applied to non-processpageedit type pages. I guess I can remove this limitation.

The extra top seems to come from the Sticky CKEditor toolbar setting ON, but I couldn't reproduce. Could you find what CSS rule is causing this?

  • Like 1
Link to comment
Share on other sites

thank you tpr, makes sense :)

sorry i had to change my code and i am using a modified page edit screen (because i have a files field and need to store files, so it has to be a page). there everything works fine.

would be nice to remove the editlink limitation. i'm using lots of my fields in custom forms for a processmodule! thank you

Link to comment
Share on other sites

Just uploaded v104 that adds ctrl+u source mode toggle to CKEditors (CKEaddons keystrokes), plus a new CKEditor plugin Keep TextSelection. The latter works with the non-dialog source mode only (plugin limitation).

Also contains bernhard's request to allow field edit links on non-pageedit pages, and a possible fix for the PHP 5.3.8 issue reported by @Noboru which is probably due to the missing support for closures - if so, I'll rewrite all of them in the module.


  • Like 3
Link to comment
Share on other sites

Hey @tpr - have you considered adding edit links to the breadcrumb trail so that when you are editing a page, you could easily click on one of its parents in the breadcrumb to edit it? Maybe an edit icon after its title, or maybe longclick (although this is becoming synonymous with modal editing which I don't think we want in this case).

Link to comment
Share on other sites

Sometimes I feel I write the readme in vain :)

Add long-click and ctrl+click actions to breadcrumbs: if enabled, long-click on a breadcrumb item will open the corresponding front-end page in a new tab/window, and holding the Ctrl key when clicking on them will navigate to their edit screen.

I know it's not too user-friendly but it's there and working :)

  • Like 1
Link to comment
Share on other sites

8 minutes ago, tpr said:

Sometimes I feel I write the readme in vain

Jeez - make me feel bad why don't you :)

I did think I'd seen something along those lines mentioned, but when I went to try it, it didn't work. I am getting a mix of "popup blocked" by Chrome for the long-click and nothing happening for the CTRL / CMD click. Remember I am on a Mac, so maybe that's the issue?

Link to comment
Share on other sites

It works here in both themes - this is the snippet responsible for it (in Hotkeys.js):

$('#breadcrumbs').on('click', 'a', function (e) {
    if ((e.metaKey || e.ctrlKey) && $(this).attr('data-editurl')) {
        var url = $(this).attr('data-editurl');
        window.location = url;

Do you see something wrong with it?

If you type "ProcessWire.config.AOS_breadcrumbs" to the console and execute, you can see the array of objects for the breadcrumbs, perhaps there's something failing here.

Link to comment
Share on other sites

49 minutes ago, tpr said:

I know it's not too user-friendly but it's there and working :)

It's not working quite right in Firefox. The data-url and data-editurl attributes are for the neighbouring breadcrumb item. In the screenshot below the Home item has the data- attributes for the "Four" page.


  • Like 2
Link to comment
Share on other sites

Ok, so the problem with the default theme is that the edit links are off by one level, so if you click on the direct parent it doesn't work and if you click on the Home link then you get the child below it. Everything is fine with Reno. 

I expect the problem is similar to what I experienced when modifying the breadcrumbs with AdminRestrictBranch. Do a quick search for breadcrumb in my commit history: https://github.com/adrianbj/AdminRestrictBranch/commits/master and you'l see some of the things I did to make it work with Reno. Maybe this will help you in the reverse direction to get this working for the default theme.

EDIT: Sorry, this is exactly what @Robin S just pointed out!

Link to comment
Share on other sites

2 minutes ago, adrian said:

Ok, so the problem with the default theme is that the edit links are off by one level, so if you click on the direct parent it doesn't work and if you click on the Home link then you get the child below it.

It seems to be browser-specific on PC. In Chrome the attributes are correct but in Firefox they're wrong.

Link to comment
Share on other sites

Thanks - actually the screenshot helped, you have debug mode on and that adds an extra item there.

Replace line 45 in Hotkeys.js with this:

$('#breadcrumbs a:not(.pw-panel):not([href="#"])').each(function (i) {

@adrian I'm just generating the editurl/url for the current page and add the data-attributes with jQuery, which is not the smartest way I admit. Maybe this thing needs to be revised some day.

  • Like 1
Link to comment
Share on other sites

10 minutes ago, tpr said:

Thanks - actually the screenshot helped, you have debug mode on and that adds an extra item there.

That raises the question: why aren't the debug and quick-tree icons shown in Chrome PC? An AOS issue or core issue?


Edit: they're not visible in IE11 either. Weird.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By FireWire
      Hello community!

      I want to share a new module I've been working on that I think could be a big boost for multi-language ProcessWire sites.

      Some background, I was looking for a way for our company website to be efficiently translated as working with human translators was pretty laborious and a lack of updating content created a divergence between languages. I, and several other devs here, have talked about translation integrations and have recognized the power that DeepL has. DeepL is an AI deep learning powered service that delivers translation quality beyond any automated service available. After access to the API was opened up to the US, I built Fluency, a DeepL translation integration for ProcessWire.
      Fluency brings automated translation to every multi-language field in the admin, and also provides a translation tool allowing the user to translate their text to any language without it being inside a template's field. With Fluency you can:
      Translate any plain textarea or text input Translate any CKEditor content (yes, with markup) Translate page names for fully localized URLs on every page Translate your in-template translation function wrapped strings Translate modules Fluency is free, and now so is DeepL
      Since this module was first built DeepL has introduced free Developer accounts that allow anyone to start using Fluency at zero cost and beginning with the version 0.3.0 release Fluency now supports free DeepL accounts. As of June 2021 DeepL supports translation to 26 languages and continues to offer more.
      Installation and usage is completely plug and play. Whether you're building a new multi-language site, need to update a site to multi-language, or simply want to stop manually translating a site and make any language a one-click deal, it could not be easier to do it. Fluency works by having you match the languages configured in ProcessWire to DeepL's. You can have your site translating to any or all of the languages DeepL translates to in minutes (quite literally).
      Let's break out the screenshots...
      When the default language tab is shown, a message is displayed to let users know that translation is available. Clicking on each tab shows a link that says "Translate from English". Clicking it shows an animated overlay with the word "Translating..." cycling through each language and a light gradient shift. Have a CKEditor field? All good. Fluency will translated it and use DeepL's ability to translate text within HTML tags. CKEditor fields can be translated as easily and accurately as text/textarea fields.

      Repeaters and AJAX created fields also have translation enabled thanks to a JavaScript MutationObserver that searches for multi-language fields and adds translation as they're inserted into the DOM. If there's a multi-language field on the page, it will have translation added.

      Same goes for image description fields. Multi-language SEO friendly images are good to go.

      Creating a new page from one of your templates? Translate your title, and also translate your page name for native language URLs. (Not available for Russian, Chinese, or Japanese languages due to URL limitations). These can be changed in the "Settings" tab for any page as well so whether you're translating new pages or existing pages, you control the URLs everywhere.

      Language configuration pages are no different. Translate the names of your languages and search for both Site Translation Files (including all of your modules)

      Translate all of the static text in your templates as well. Notice that the placeholders are retained. DeepL is pretty good at recognizing and keeping non-translatable strings like that. If it is changed, it's easy to fix manually.

      Fluency adds a "Translate" item to the CMS header. When clicked this opens up a modal with a full translation tool that lets the user translate any language to any language. No need to leave the admin if you need to translate content from a secondary language back to the default ProcessWire language. There is also a button to get the current API usage statistics. DeepL account owners can set billing limitations via character count to control costs. This may help larger sites or sites being retrofitted keep an eye on their usage. Fluency can be used by users having roles given the fluency-translate permission.

      It couldn't be easier to add Fluency to your new or existing website. Simply add your API key and you're shown what languages are currently available for translation from/to as provided by DeepL. This list and all configuration options are taken live from the API so when DeepL releases new languages you can add them to your site without any work. No module updates, just an easy configuration. Just match the language you configured in ProcessWire to the DeepL language you want it to be associated with and you're done. Fluency also allows you to create a list of words/phrases that will not be translated which can prevent items such as brands and company names from being translated when they shouldn't

      No "translate page" - Translating multiple fields can be done by clicking multiple translation links on multiple fields at once but engineering a "one click page translate" is not feasible from a user experience standpoint. The time it takes to translate one field can be a second or two, but cumulatively that may take much longer (CKEditor fields are slower than plain text fields). There may be a workaround in the future but it isn't currently on the roadmap. See a solution below... No "translate site" - Same thing goes for translating an entire website at once. It would be great, but it would be a very intense process and take a very (very) long time. There may be a workaround in the future but it isn't on the roadmap. No current support for Inline CKEditor fields - Handling for CKEditor on-demand hasn't been implemented yet, this is planned for a future release though and can be done. I just forgot about it because I've never really used that feature personally.. Alpha release - This module is in alpha. Releases should be stable and usable, but there may be edge case issues. Test the module thoroughly and please report any bugs via a Github issue on the repository or respond here. Please note that the browser plugin for Grammarly conflicts with Fluency (as it does with many web applications). To address this issue it is recommended that you disable Grammarly when using Fluency, or open the admin to edit pages in a private window where Grammarly may not be loaded. This is a long-standing issue in the larger web development community and creating a workaround may not be possible. If you have insight as to how this may be solved please visit the Github page and file a bugfix ticket.
      Translate All Fields On A Page
      An exciting companion module has been written by @robert which extends the functionality of Fluency to translate all fields on a page at once. The module has several useful features that can make Fluency even more useful and can come in handy for translating existing content more quickly. I recommend reading his comments for details on how it works and input on best practices later in this thread.
      Get the module at the Github repo: https://github.com/robertweiss/ProcessTranslatePage
      ProcessWire  3.0+ UIKit Admin Theme That's Fluency in a nutshell. A core effort in this module is to create it so that there is nothing DeepL related hard-coded in that would require updating it when DeepL offers new languages. I would like this to be a future-friendly module that doesn't require developer work to keep it up-to-date.
      The Module Is Free
      This is my first real module and I want to give it back to the community as thanks. This is the best CMS I've worked with (thank you Ryan & contributors) and a great community (thank you dear reader).
      DeepL Developer Accounts
      In addition to paid Pro Developer accounts, DeepL now offers no-cost free accounts. Now all ProcessWire developers and users can use Fluency at no cost. Learn more about free and paid accounts by visiting the DeepL website. Sign up for a Developer account, get an API key, and start using Fluency.
      Download & Feedback
      Download the latest version here
      Github repository:
      File issues and feature requests here (your feedback and testing is greatly appreciated):
      Thank you! ¡Gracias! Ich danke Ihnen! Merci! Obrigado! Grazie! Dank u wel! Dziękuję! Спасибо! ありがとうございます! 谢谢你!

    • By kixe
      Field that stores one or more references to ProcessWire pages with additional data in field context.
      Values are editable via page edit modal of the referenced page provided from the field if module AdminPageFieldEditLinks is installed and "Enable link to create new pages?" is checked in field settings.
      Requirements: AdminPageFieldEditLinks >= 3.1.4
      Use case example:
      The planning of the Tonmeistertagung in the CCD (Congress Center Düsseldorf) from November 3rd, 2021 to November 6th, 2021 is in the finalization phase.
      The conference consists of a conference part and an exhibition. The planning is done via a separate frontendless PW instance. There, all companies (pages) that are active at various events are kept in a pool. Changes (address, logo) can always be done there. For the exhibition of the current conference in November, the exhibitor-companies (pages) are selected via a page reference field. A stand number must now be assigned to each selected company (page). We had originally solved this using the Profield FieldtypeTable. However, this had the disadvantage that each entry again made all companies available for selection and did not recognize which were already selected in a previous table row. The new field type now allows the value (company's stand number) to be assigned to a Company (page) in context to a specific Pagefield living in a specific page.
    • By Robin S
      This module lets you add some custom menu items to the main admin menu, and you can set the dropdown links dynamically in a hook if needed.
      Sidenote: the module config uses some repeatable/sortable rows for the child link settings, similar to the ProFields Table interface. The data gets saved as JSON in a hidden textarea field. Might be interesting to other module developers?
      Custom Admin Menus
      Adds up to three custom menu items with optional dropdowns to the main admin menu.
      The menu items can link to admin pages, front-end pages, or pages on external websites.
      The links can be set to open in a new browser tab, and child links in the dropdown can be given an icon.
      Requires ProcessWire v3.0.178 or newer.
      Example of menu items

      Module config for the menus

      Link list shown when parent menu item is not given a URL

      Setting child menu items dynamically
      If needed you can set the child menu items dynamically using a hook.
      $wire->addHookAfter('CustomAdminMenus::getMenuChildren', function(HookEvent $event) { // The menu number is the first argument $menu_number = $event->arguments(0); if($menu_number === 1) { $colours = $event->wire()->pages->findRaw('template=colour', ['title', 'url', 'page_icon']); $children = []; foreach($colours as $colour) { // Each child item should be an array with the following keys $children[] = [ 'icon' => $colour['page_icon'], 'label' => $colour['title'], 'url' => $colour['url'], 'newtab' => false, ]; } $event->return = $children; } }); Create multiple levels of flyout menus
      It's also possible to create multiple levels of flyout submenus using a hook.

      For each level a submenu can be defined in a "children" item. Example:
      $wire->addHookAfter('CustomAdminMenus::getMenuChildren', function(HookEvent $event) { // The menu number is the first argument $menu_number = $event->arguments(0); if($menu_number === 1) { $children = [ [ 'icon' => 'adjust', 'label' => 'One', 'url' => '/one/', 'newtab' => false, ], [ 'icon' => 'anchor', 'label' => 'Two', 'url' => '/two/', 'newtab' => false, 'children' => [ [ 'icon' => 'child', 'label' => 'Red', 'url' => '/red/', 'newtab' => false, ], [ 'icon' => 'bullhorn', 'label' => 'Green', 'url' => '/green/', 'newtab' => false, 'children' => [ [ 'icon' => 'wifi', 'label' => 'Small', 'url' => '/small/', 'newtab' => true, ], [ 'icon' => 'codepen', 'label' => 'Medium', 'url' => '/medium/', 'newtab' => false, ], [ 'icon' => 'cogs', 'label' => 'Large', 'url' => '/large/', 'newtab' => false, ], ] ], [ 'icon' => 'futbol-o', 'label' => 'Blue', 'url' => '/blue/', 'newtab' => true, ], ] ], [ 'icon' => 'hand-o-left', 'label' => 'Three', 'url' => '/three/', 'newtab' => false, ], ]; $event->return = $children; } }); Showing/hiding menus according to user role
      You can determine which menu items can be seen by a role by checking the user's role in the hook.
      For example, if a user has or lacks a role you could include different child menu items in the hook return value. Or if you want to conditionally hide a custom menu altogether you can set the return value to false. Example:
      $wire->addHookAfter('CustomAdminMenus::getMenuChildren', function(HookEvent $event) { // The menu number is the first argument $menu_number = $event->arguments(0); $user = $event->wire()->user; // For custom menu number 1... if($menu_number === 1) { // ...if user does not have some particular role... if(!$user->hasRole('foo')) { // ...do not show the menu $event->return = false; } } });  
    • By tcnet
      This module for ProcessWire sends a notification email for each failed login attempt. Similar modules exists already in the module directory of ProcessWire. However, this module is designed to notify, even if specified user doesn't exist.
      The settings for this module are located in the menu Modules=>Configure=>LoginFailNotifier.
      Notification email
      Specifies the email address to which the notification emails should be sent.
        Email subject
      Specifies the subject line for the notification email.
        Post variables
      Specifies the $_POST variables to be included in the notification email. Each variable must be separated by a comma. For example: login_name,login_pass
        Server variables
      Specifies the $_SERVER variables to be included in the notification email. Each variable must be separated by a comma. For example: REMOTE_ADDR,HTTP_USER_AGENT
      Link to ProcessWire module directory:
      Link to github.com:
    • By Fokke
      ProcessWire 3.x markup module for rendering meta tags in HTML document head section. Note that this module is not a full-blown SEO solution, but rather a simple tool for rendering meta tags based on module configuration. Adding custom meta tags is also supported.
      Built-in meta tags
      The following meta tags are supported out-of-the-box:
      Document title consisting of page title and site name Character set Canonical Viewport Description Keywords Hreflang tags Open Graph og:title og:site_name og:type og:url og:description og:image og:image:width og:image:height Twitter meta tags twitter:card twitter:site twitter:creator twitter:title twitter:description twitter:image Facebook meta tags fb:app_id The full documentation with configurable options can be found here: https://github.com/Fokke-/MarkupMetadata
      ProcessWire>=3.0.0 PHP >=7.1 Installation using Composer
      composer require fokke/markup-metadata Manual installation
      Download latest version from https://github.com/Fokke-/MarkupMetadata/archive/master.zip Extract module files to site/modules/MarkupMetadata directory.
  • Create New...