Jump to content

HerTha

Members
  • Posts

    52
  • Joined

  • Last visited

Posts posted by HerTha

  1. 5 hours ago, Pip said:

    Problem 1: I tried doing the field as a page reference but when it comes to duplicate pages it just doesn't work.

    Hi Pip, for me, it is not clear what you mean here - basically, using a Page Reference field sounds like a good approach for such an assignment of (a number of) 'ingredient' pages to an 'item' page. I think we need some more details to analyze the problem...

  2. Great to hear it works! Thanks for providing a summary to help others!

    This reminds me to #1 support rule:

    Quote

    Your problem can be fixed easily! We just need to find the cause, first...

     

  3. On 4/29/2020 at 9:06 AM, 2hoch11 said:

    RewriteCond %{QUERY_STRING} ^id=(\d+) [NC]

    This matches numerical IDs only, right? Could that be the reason for not working with text like 'agb'?

  4. Installed the module and works out-of-the-box. Thank you very much for providing it!

    In my application I use a custom URL field named "link". So I replaced "url" with "link" in the module settings, i.e. in "Returned fields" and "Result template" and "Link template".

    Now, the url/link part is not inserted correctly, this is the resulting source:

    <a data-pageid="10666" href="[object Object]">@abcde</a></p>

    Could you look into this, if time permits? TIA!

  5. Sometimes, a task seems to be challenging at first, but the solution turns out to be surprisingly simple.

    Fortunately, while working with Processwire, this is a very common situation 🙂

    I hope someone can help me repeating this experience.

    I use pages to define external links. So, for every external link there is a page object with a descriptive text (field) and an url (managed by the most valuable VerifiedURL fieldtype).

    It is easy to add a page reference field to a template for using these. How to use such references within a CKEditor context, though?

  6. I am not a web developer pro, but I understand that a (piece of) code or a (programming) concept can be "beautiful". If you make yourself familiar with Processwire, you will find such very often.

    • Like 4
  7. If you could have a quick look at those database details before I carry out the update, that would be great! Thanks a lot for your offer. Maybe it spreads some light on what's going on behind the scenes, on such server/setup. I'll send you a PM then (it'll be 2..3 weeks from now)...

     

    • Like 1
  8. Okay, I understand there is no simple toggle/option to exclude/include hidden files, so I will have a closer look at hooks then.

    Thank you so much for the time you are dedicating to maintain this module and to answering (my) questions!

    • Like 1
  9. 3 hours ago, Wanze said:

    What kind of control do you need exactly?

    I'd like to exclude all hidden pages - except for a few specific ones (manually selected).

    Is there a way how this could be established?

  10. Hi @Mike Rockett first let me repeat what I told you two years ago: Thank you for the Jumplinks module! This is one of the big life savers when it comes to run a real-world website, IMHO. Great job, thanks for maintaining this project!

    Thought it was time to update the module from 1.5.50 to 1.5.60.

    Same happened to me what was reported here:

    On 12/3/2019 at 9:01 AM, OllieMackJames said:

    I keep getting this error:

    
    Failed to init module: ProcessJumplinks - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'last_hit'

    Any ideas how to fix this?

    thanks

    I don't feel very comfortable with patching databases myself, but as it's just a test site I fired up phpMyAdmin.

    The proposed workaround:

    On 12/3/2019 at 9:09 AM, OllieMackJames said:

    OK, already fixed it.

    I dropped the column from the database

    Then I also had to drop the whole process_jumplinks_nf table and now the error is gone

    fixed the problem for me. Of course, besides the 404 log was empty, all the "Last hit" information was gone. No problem on a test site, but I don't want to loose this information on the production site. Any ideas on a better way to handle this?

  11. I just did an update from 2.05 to 2.06. When finished, I checked module config, which told me I currently have no protected pages at all. Truth is, however, there is actually 1 protected page. Also, this page (protection) still worked after the update.

    I checked on another site where I have multiple protected resources. On this site - after updating - module config showed me all protected pages, however the numeric count in the headline was given wrongly.

    Could there be a regression in determining the count of protected pages?

    I use PW >/= 3.0.123 on both sites.

    • Like 1
  12. Thank you guys for digging into this! This forum is just awesome!

    I am trying to summarize:

    We found out that array syntax is able to handle "!" properly.

    We also found that there are other workarounds for accepting (or filtering) "&".

    So, that are all interesting details, good to know. However, the question from my original post is still circulating my head:

    On 5/18/2019 at 12:21 PM, HerTha said:

    Obviously, there are a number of scenarios (including the ! char) which are not catched by the sanitizer, but need to be taken care of. 

    Anyone who can share a list of forbidden chars or an algorithm to handle the filtering more securely in such a situation?

    I thought this has been done a thousand times...

     

     

  13. further investigation -

    I simplified the code to:

    $a_sel = [
        ['template', 'downfile'],
        ['title|name|indexer', '%=', $a_terms]
    ];
    $results = $pages->find($a_sel);

    So, there are 3 fields to search: "title", "name" and "indexer" (a textarea field).

    Still using $a_sel = "&hallo".

    It turns out, that the error occurs only if:

    • "name" field is present and
    • at least one more field is present

    The combination "title" with "indexer" works just fine.

    I have never filed an issue report, but this one could be worth it. Anyone who can duplicate this error?

    • Like 1
  14.  

    25 minutes ago, Zeka said:

    $sanitizer->selectorValue($a_terms)

    that extra sanitizer removes the error, Tracy reports $a_sel to be:

    image.png

    So, for this case, the documentation seems to be wrong:

    19 hours ago, Zeka said:

    Using array syntax, it's no longer necessary to use the $sanitizer->selectorValue() method to sanitize text that goes into selectors.

     

     

    • Like 1
  15. I have rearranged the code to use array syntax for the selector:

    $a_sel = [
        ['sort', 'name'],
        ['limit', $limit_per_section],
        ['template', 'downfile'],
        ['title|name|indexer', '%=', $a_terms]
    ];
    $results = $pages->find($a_sel);

    Now, if $a_terms contains search term "!hallo" then all is fine. Problem solved!?

    Well, not really. Searching for "&hallo" still crashes:

    Quote

    Exception: Unknown Selector operator: '%=&' -- was your selector value properly escaped? field='title', value='hallo', selector: 'include=all, title%=&hallo' (in /home/abcdefg/public_html/wire/core/Selectors.php line 419)

    #0 /home/abcdefg/public_html/wire/core/Selectors.php(460): ProcessWire\Selectors->create('title', '%=&', 'hallo')

    #1 /home/abcdefg/public_html/wire/core/Selectors.php(142): ProcessWire\Selectors->extractString('')

    ...

    I understand this should not happen, my debugging skills are a bit limited, though...

  16. Okay, as I have multiple calls to find() on that page, I tried to narrow it down a bit and removed all but one.

    If the search is for, e.g., "hallo" then all is fine.

    However, if searching for "!hallo", that particular error (see above) occurs.

    The offending selector, as Tracy bd() reports:

    "sort=name,limit=50,template=downfile,title|name|indexer%="!hallo""

    I can't see anything wrong with it...

×
×
  • Create New...