Jump to content

Dynamic Description & Notes


adrian
 Share

Recommended Posts

@teppo - I think that's a very desirable use case. I use locked fields quite a lot. I guess I just haven't ever needed them together with this module's functionality before. My quick testing also shows that it is working as expected with Inputfield::renderReadyHook. I am not sure I can think of any issues with it at the moment, so I'll probably commit soon.

At the moment, all my modules still rely on the file compiler. I guess I just haven't seen the need to break any 2.x installs because it seems to work just fine and once it's compiled the first time, I don't think there is any significant (if any) overhead. Are you aware of any?

As for composer - yeah, I probably should - for whatever reason, Composer still doesn't really gel with me so I tend to avoid it when possible :)

 

  • Like 1
Link to comment
Share on other sites

12 minutes ago, adrian said:

At the moment, all my modules still rely on the file compiler. I guess I just haven't seen the need to break any 2.x installs because it seems to work just fine and once it's compiled the first time, I don't think there is any significant (if any) overhead. Are you aware of any?

Not really.

I've had some issues in the past, mostly related to disk cache getting out of sync or somehow the module compilation itself messing up the code (but such cases have been super rare). Mostly it just feels unnecessary and a bit "off" to have a separate copy of the code and then have the system abstract that layer away.

If I could, I would likely disable module compilation entirely from my/our projects (just like template compilation), but there are indeed still some modules that depend on it, so for now it's a no-go ?

Link to comment
Share on other sites

16 minutes ago, teppo said:

I'm wondering if there's some use case where current way of getting properties via eval is necessary?

You know what, I don't think there is actually a need for it. I was sure there was at the time so I am wondering if PW supported periods in $page->get many years ago (keeping in mind that I actually started using this module in 2015 even though it wasn't public until much later). Or maybe I just wasn't aware back then of the ability to do $page->get('field') vs $page->field in general.

Anyway, it's pretty clear that we can now do $page->get('parent.id') so it does look like your solution now works well, so I'll replace it in the next commit.

Mind you, I don't really have a problem with eval() in cases like this but I understand the issue of automated scanners picking up on it. 

  • Like 1
Link to comment
Share on other sites

7 minutes ago, teppo said:

If I could, I would likely disable module compilation entirely from my/our projects (just like template compilation), but there are indeed still some modules that depend on it, so for now it's a no-go ?

If you ever find that it's just my modules that are holding up this transition for you, let me know and I'll make the change.

  • Like 1
Link to comment
Share on other sites

On 1/11/2023 at 3:26 AM, adrian said:

Thanks for the report @LAPS - it should be fixed in the latest version. Please let me know.

@adrian, thanks for updating the module to v0.1.8, which I installed in ProcessWire 3.0.210.

I'm using Hanna Code v0.3.2 and Hanna Code Text Formatter v0.3.2 (the latter with module settings Open Tag set to [[ and Close Tag set to ]]).

Given in the field description and/or notes I use a hanna code such as [[my-hanna-code-tag attribute1="Some value" attribute2="Some other value"]], when I access the PW Admin > Edit Page (page where that field is used) then I get the error: "Unknown Selector operator: '[empty]' -- was your selector value properly escaped? In /wire/core/Selectors.php line 222".

1553267305_Screenshot2023-01-15at00_02_44.thumb.png.4503939a6a5606f8ff3b077872c120ff.png

?

Note: the error doesn't occur when using hanna code such as [[my-hanna-code-tag]].

Link to comment
Share on other sites

@adrian, I've got one more request (kind of). Earlier you added composer.json, but didn't yet push the project to packagist.org. Would be nice if you could add the module there as well, otherwise it can only be installed by adding the GitHub repository directly.

Thanks in advance! ?

  • Like 1
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...