Jump to content

froot

Members
  • Posts

    729
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by froot

  1. Huzzah!

    After what feels like years of digging, I think I finally found the culprit. On the config.php file, I had: 

    $config->pageNumUrlPrefix = 'Seite';

    Not sure how this made it to multiple projects of mine and why I thought it had to be there. Without that line, the pager on admin pages works fine. And the pagination using German "seite" instead of "page" works in the frontend too because I think it's defined somewhere in the database.

    Anyways, case closed, happy days.

    @ryan @kongondo

  2. I get this error…

    Warning: Undefined array key "message_override__1021" in /var/www/html/site/assets/cache/FileCompiler/site/modules/PageProtector/PageProtector.module.php on line 519
    Warning: Undefined array key "prohibited_message__1021" in /var/www/html/site/assets/cache/FileCompiler/site/modules/PageProtector/PageProtector.module.php on line 520


    is it just me?

    EDIT:

    That's only when I do this:

    $options = array(
    	"page_protected" => true,
    );
    $page->protect($options);

    as described here…

    On 11/7/2025 at 6:10 AM, adrian said:

    but when I just do:

    // _main.php
    $page->protect = true;
     
    The warnings are gone and the page is protected programmatically.
     
    Cheers!
    • Like 1
  3. Hello dear Processwirers,

    quick question, I always struggle with the ->has() API when it comes to page reference fields. Which syntax is correct and reliable? Cause I never know if I coincidentally get false positives or false negatives or if I'm actually doing it right.

    if ($somePageField->has($somePage)
    if ($somePageField->has($somePage->id)
    if ($somePageField->has("id=$somePage->id")

    and does it make a difference whether the page field allows multiple page selection or not AND does it make a difference if the related page is a user page? I mean can I do this:

    if ($somePageField->has("id=$this->user->id")

    Thanks for help!

  4. Hello Processwirers,

    I have been having an issue with the pagination in the PW admin. This issue occurs not on all but on different modules and projects and webservers. I just cannot seem to navigate to any of the other pages in the pager, it just keeps loading endlessly and does not load any content. You can observe the similar behaviour in 2 different projects of mine in the screen recordings below. One occurrence of this bug is within ProTables and another within MediaManager @kongondo (I cannot think of any other ones right now but I think it should be enough to assume that this might not be module specific?).

    I appreciate any input!

     

     

     

     
  5. When trying to connect to Google I get:

    Error 400: redirect_uri_mismatch

    I think however that I did everything right in the Google Console
    - setup the project
    - enabled the desired API (google calendar)
    - set up a Service Account 
    - downloaded the Service Account JSON (correct format with type: service_account) and uploaded put in the module’s Authentication Config field.
    - shared the calendar with the Service Account (permissions: Make changes and manage sharing)
    - created an OAuth 2.0 Client ID (Web application, named “ProcessWire GoogleClientAPI”).
    - added Authorized JavaScript origins
    - Added Authorized redirect URIs like so: https://myspecificsite.com.ddev.site/admin/module/edit?name=GoogleClientAPI
    - Noted the client_id and client_secret and entered them in the module’s Client ID and Client Secret fields.

    Any ideas what I might be doing wrong? I doubt the error is that it's a local installation, I get the same error when it's on the live server.
    All support I can find is just saying that the OAuth URI might mismatch, lacking a trailing slash or something but I think that's not the case either.

    Thanks for help!

    EDIT: I think the error could be that the module is making a OAuth request to
    https://myspecificsite.com.ddev.site/admin/module/edit?name=GoogleClientAPI flowName=GeneralOAuthFlow
    which is not what's defined in the Google Console nor can it be with the empty space in there. There should at least be a "&" before the "flowName" GET variable?

    @ryan

  6. 5 hours ago, TomPich said:

    That’s my point. When using webpack on a website, you have to map the includes with the corresponding node_module folders. It does not find them automatically. That has to be done in the webpack.config.js.

    I thought that’s why you have resolve and alias in webpack.config.js…

    resolve: {
    	extensions: ['.js'],
    	alias: {
    		'@fullcalendar': path.resolve(__dirname, 'node_modules/@fullcalendar')
    	}
    },
     
    #########
     
    @AndZyk I tried the old-school way, but like I said, it’s the “import” command that causes the errors, and there’s still import commands inside the included fullcalendar scripts…  
     
    7 hours ago, froot said:

    Uncaught TypeError: Failed to resolve module specifier "tslib". Relative references must start with either "/", "./", or "../".
    Uncaught TypeError: Failed to resolve module specifier "@fullcalendar/common". Relative references must start with either "/", "./", or "../".

  7. Thanks again, but if I try without webpack, i.e. without bundle.js but directly like this:

    <!-- Include FullCalendar JS -->
    <script type="module" src="<?=wire()->urls->httpRoot?>../node_modules/@fullcalendar/core/main.js"></script>
    <script type="module" src="<?=wire()->urls->httpRoot?>../node_modules/@fullcalendar/daygrid/main.js"></script>
    <script type="module" src="<?=wire()->urls->httpRoot?>../node_modules/@fullcalendar/timegrid/main.js"></script>
    <script type="module" src="<?=wire()->urls->httpRoot?>../node_modules/@fullcalendar/interaction/main.js"></script>
     
    I still get similar errors:
     
    Uncaught TypeError: Failed to resolve module specifier "tslib". Relative references must start with either "/", "./", or "../".
    Uncaught TypeError: Failed to resolve module specifier "@fullcalendar/common". Relative references must start with either "/", "./", or "../".


    because the import commands are still on these included files!
  8. 56 minutes ago, TomPich said:

    Sorry, maybe a dumb question to ask, but did you configure (resolve path / module to use, babel-loader)?

    I'm not sure what you mean here…

    57 minutes ago, TomPich said:

    Did you try that specifying the exact location of the files?

    If you mean, trying to do ./node_modules/fullcalendar/core then yes I tried that (also with / and ../) and all log a 504 not found error.

  9. I know this is not exactly ProcessWire related, but it's still an issue I'm facing while trying to implement in a PW site.

    I'm trying to get Fullcalendar to work, first I included it via CDN, which worked OK, but then I wanted to implement the rrule plugin which always threw an error that I just never managed to resolve. Then I switched to installing it via npm, not least because in the long run I would like to have Fullcalendar be served locally anyway, which is the best practice (?).

    I followed the instructions on www.fullcalendar.io concerning the implementation via npm:

    import { Calendar } from '@fullcalendar/core/';
    import dayGridPlugin from '@fullcalendar/daygrid';
    import timeGridPlugin from '@fullcalendar/timegrid';
    import interactionPlugin from '@fullcalendar/interaction';
    
    document.addEventListener('DOMContentLoaded', function() {
    const calendarEl = document.getElementById('calendar')
    const calendar = new Calendar(calendarEl, {
    initialView: 'dayGridMonth'
    })
    calendar.render()
    })
     
    But the calendar does not render and I keep getting this error:
     
    Uncaught TypeError: Failed to resolve module specifier "@fullcalendar/core/". Relative references must start with either "/", "./", or "../".

    FYI
    I'm using webpack to bundle it and entry and output points seem to work fine.
    All node_modules are visible in the file system.
    I don't use any framework like react, just vanilla js.
    Error occurs on Chrome, FF and Safari

    Help is very much appreciated, I already lost a couple of days over this 🙈
  10. if($user->isLoggedin() && !$input->get('profile') && !$input->get('logout')) {
    echo '<h2>'.__('Mein Profil').'</h2>';
    echo '<p><strong>'.$user->fields[130].': </strong>' . '<span>'.$user->givenname.'</span></p>';
    echo '<p><strong>'.$user->fields[131].': </strong>' . '<span>'.$user->lastname.'</span></p>';
    echo '<p><strong>'.$user->fields[92].': </strong>' . '<span>'.$user->email.'</span></p>';
    echo '<p><strong>'.$user->fields[171].': </strong>' . '<span>'.$user->units_balance.'</span></p>';
    }

    I don't know why none of the values don't return anything (in the span tags). Also, the ->fields[] API is not very elegant either. 

  11. https://github.com/dtjngl/DiagnosticLogger

    # DiagnosticLogger

    Do you struggle like me with keeping track of updates across multiple website projects? If so, here's a solution for you. It's not perfect, but it's a start.

    **DiagnosticLogger** is a ProcessWire module designed to handle diagnostic logs and create notifications in the admin GUI. It can also send automated email summaries for warnings and errors found in these logs.

    ## Features

    - **Log Handling**: Captures and processes diagnostic logs.
    - **Admin Notifications**: Displays notifications within the admin GUI for detected issues.
    - **Email Summaries**: Sends automated emails summarizing warnings and errors.

    ## Integration

    The module integrates with **ProcessDiagnostics**, which is required for its functionality. It is designed to work seamlessly with ProcessDiagnostics but is not highly configurable.

    ## Important!!

    I wasn't able to accomplish this in the hook from inside the DiagnosticLogger class so you need to add these lines in the ProcessDiagnostics.module file to make this work.

    public function ___execute() {
        wire('log')->delete('diagnostics'); // to not be redundant
        // …
        foreach ($results as $caption => $section_results) {
            // …
            foreach ($section_results as $k => $row) {
                // …
                wire('log')->save('diagnostics', '|' . $row['title'] . '|' . $row['value'] . '|' . $row['status'] . '|' . $row['action']);
            }
        }
    }

    This will log the diagnostics everytime the ProcessDiagnostics runs. I still haven't figured out how to run diagnostics automatically or schedule them.

    ## Workaround for Background Diagnostics

    The logging feature acts as a workaround due to difficulties with running diagnostics in the background. The hooked method from ProcessDiagnostics will need to be made hookable for better integration.

    ## Configuration

    1. Access the configuration settings in the ProcessWire admin interface.
    2. Adjust the settings according to your needs.

    ## email LazyCron Scheduling

    For scheduling tasks using LazyCron, for example:

    - every2Weeks: Runs tasks every two weeks.
    - everyDay: Runs tasks every day.
    - everyWeek: Runs tasks every week.

    ## Installation

    1. Download the module and place it in the `site/modules` directory.
    2. Log in to the ProcessWire admin interface.
    3. Go to Modules > Refresh.
    4. Locate **DiagnosticLogger** and click **Install**.

    ## Usage

    Once installed, **DiagnosticLogger** will automatically start processing diagnostic logs. You can view notifications in the admin GUI and receive email summaries based on your configuration.

    ## Requirements

    - ProcessWire 3.x or later
    - ProcessDiagnostics module

    • Like 3
  12. As you can see in the screenshots, the PW logo (and maybe other less apparent stuff too) have links to files inside the AdminThemeBoss folder that don't even exist anymore, because I uninstalled it and deleted it. So that must mean, that this is set in the database but when uninstalling the theme, links are not reset? 

    What to do? Can't find anything when searching the database for "boss" or "adminthemeboss". 

    614761291_Screenshot2024-08-25at09_16_51.thumb.png.7b697cbeb14f5f49efab61b23e949299.png345071085_Screenshot2024-08-25at09_17_10.thumb.png.e0aac8494a568506216ccb2b9379b8d9.png

  13. OK I found a way to disable it, not necessarily the root of the problem though.

    I had the core module SystemNotifications installed and "Notification status" was turned on. I turned it off now and the issues disappeared.

    It's a core module, so is that the expected behaviour? Or is it a known bug? I'm reluctant to install it on other installations just to investigate it further…

    • Like 2
  14. I have this one installation where the messages, warning and error appear on top of the header and also float above the button on the top right in the admin GUI, see screenshots.
    I thought it had to do with some admin theme that I once installed, namely AdminThemeBoss and somehow I can still see its effects even though I switched back to Uikit theme.

    I now also uninstalled, deleted that AdminThemeBoss, cleared compiled files, refreshed the site, downgraded PW /wire/ folder, upgraded back, nothing seems to help.

    How can I get rid of it? It's quite annoying because the floating messages cover the button and I have to wait till they are gone so I can push the button.

    Or is the issue unrelated after all?

    Thanks for help!

     

  15. Hi everybody, hello @netcarver,

    Is this module maintained? 
    In one of my projects I'm seeing status "Pending" among the Module Version Diagnostics and so no diagnostic is returned.
    Does that have to do with the particular web server settings or what else could be the reason for that?

    Thanks for help!

  16. Hi @kongondo !

    I'm still having the same issues as half a year ago, namely that I cannot navigate to the next paginated page inside MM. I was hoping that the next major update would fix that.

    Do you have an estimate when that will be released? Or can you help me fix the acute issues?

×
×
  • Create New...