Jump to content

kaz

Members
  • Posts

    273
  • Joined

  • Last visited

Posts posted by kaz

  1. I have problems with websites where logos are not displayed when the website is first called up.

    Is there a difference whether a website is accessed with or without 'www.'? When I open a site via www. ... the logo is displayed, without only when the user clicks on a link on the page.

    $config->httpHosts = array('mysite.com', 'www.mysite.com');

    Does the order in which I place it matter?

    The problem is that search engines find it different, sometimes with, sometimes without www … and the logo is missing.

    The code of the svg logo

    <img data-src="<?= urls()->templates ?>assets/images/logo.svg" uk-svg>

     

  2. For some clients it is hard to upload suitable image formats. The hero image seems to be particularly difficult …

    Is there a way to save predefined values when editing / cropping photos, e.g. 1920 x 600, 1200 x 800, etc.? This gives the customer a selection.

  3. 1 hour ago, zoeck said:

    Do you have the domains in the config in an array or as a string?

    That's how it should look:

    $config->httpHosts = array('domain.one', 'domain.two', 'domain.three');

     

    I have made the entries separated by commas on the installation. I see the fault in the config, the quote/s are wrong.

    $config->httpHosts = array('dev.my-domain.com,my-domain.com,www.my-domain.com');

    I've changed it with the editor. Thanks for the hint!

    • Like 1
  4. In the past, I used for the path entry
    base href="<?php echo $urls->httpRoot; ?>"
    entries.

    In ver. 3.0.246, the result is no longer that one domain from the config is taken over. All domains of the config.php $config->httpHosts are taken over.

    It looks like this, and of course it doesn't work:

    base href="https://dev.my-domain.com,my-domain.com,www.my-domain.com/"

    Has anything changed, what should it be like now?

  5. I would like to change the template of a home page (id 1). When I change the template in the selection, I get the following message:

    Can’t save page (id=1): /: Selected homepage template cannot be used because it does not define access.

    Status of the existing template in page id 1:
    System ID: checked
    On: Internal toggle when combined …: checked

    Which access is meant?

     

  6. If I have a field, e.g. a combo field or similar: is it possible to do an if-query for the 'fields' in it? I have a table with two columns and a few rows. I can address the rows using an if query, the question now is how do I address the table (table, tbody)?
    I hope I'm expressing it clearly. The if query is, create the table only if one of the fields has been entered:

    if ($page->sales_details > 0) {
    echo "<table class='uk-table-responsive sales-table'>
            <tbody>"; }
            if ($page->sales_details->designation) {
            echo "
                <tr>
                    <td class='sales-left uk-table-shrink'>Designation</td>
                    <td class='sales-right'>{$page->sales_details->designation}</td>
                </tr>"; }

    > 0 unfortunately does not work 😉

  7. On 12/18/2024 at 10:09 AM, kaz said:

    In frontend it may look like this:

    Wednesday, 15.01.2025, 09:00 - 12:00
    Information on this date above
    Wednesday, 22.01.2025, 10:00 - 13:00 h
    Wednesday, 29.01.2025, 09:00 - 12:00 a.m.
    … that continues for a quarter

    This is how I imagine the frontend display, I probably didn't emphasize it clearly enough. A calendar would not be necessary for recurring weekly appointments; but an date field would be great for the editor. Bernhard's calendar is great, I would use it immediately for big tasks.
    I have now realized it with ProFields Table field, via CSV import with three columns, weekday, date + time. Why did I post this question here? There are many different approaches with date and calendar, some of which I have tried. In particular the “automation”, by which I mean combining a from-date with a to-date by selecting a day of the week. If you don't ask, you can't learn. Many thanks for the answers.

    • Like 1
  8. 16 hours ago, bernhard said:

    Don't understand what you mean.

    You're right, I meant recurring dates on mostly the same days of the week. That's why I thought of automating it. CSV import would be great if there exists a source for CSV calendar data? I couldn't find one.

    RockCalendar looks great, I'll check it out. Would a simple list output in the frontend without a calendar be possible?

  9. I need a calendar, or perhaps better a list of calendar dates. A list of dates would be enough.

    In frontend it may look like this:

    Wednesday, 15.01.2025, 09:00 - 12:00
    Information on this date above
    Wednesday, 22.01.2025, 10:00 - 13:00 h
    Wednesday, 29.01.2025, 09:00 - 12:00 a.m.
    … that continues for a quarter

    I have been thinking back and forth about how to implement it in the most convenient way for the client. ProFields, a calendar module, CSV import (ProFields), …

    I imagine the handling with ProFields Table is quite cumbersome, adding manually rows takes time (!?).
    How would you do it? The client must update the data each time it expires. It's always the same day of the week, except for some days and vacations.

  10. The problem was the ports. If you have other than the standard ports, the existing hosts will no longer work after the upgrade to ver. 7.2, because 7.2 resets the ports to default. What to do? Note down your own ports to be able to change them back after the upgrade.
    What did I do? I have uninstalled everything to zero. Then I reinstalled ver. 7.1, created the hosts manually and imported the database via phpMyAdmin, updated the config files until everything worked fine. The ports are now standard, so I have again dared to upgrade to ver. 7.2.
    Successful, everything is running fine. I was unfortunately misled by PHP error messages ;) To summarize: Pay attention of your ports for major upgrades.

  11. I use MAM Pro on macOS. At the last launch I was notified of an upgrade from 7.1x to 7.2, which I confirmed.

    After the upgrade, when opening sites, also localhost, the following error message appears in the browser:

    Internal Server Error
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    
    Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
    
    More information about this error may be available in the server error log.
    Apache/2.4.62 (Unix) mod_wsgi/5.0.1 Python/3.12 mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.1.1w Server at my-site.local Port 8891

    I have contacted the support and got the following answer:

    "You may have to completely reinstall the app.
    https://support.mamp.info/knowledgebase.php?article=170"

    I have backed up the databases and hosts and reinstalled MAMP. I restored the database and created the hosts manually. So far, so good.

    Unfortunately, the error message remains almost identical for the hosts, only the port has been changed from 8891 to 8890:

    Internal Server Error
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    
    Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
    
    More information about this error may be available in the server error log.
    
    Apache/2.4.62 (Unix) mod_wsgi/5.0.1 Python/3.10 mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.1.1w Server at my-site.local Port 8890

    SSL certificates are included with all rights in the keychain administration. Perhaps Processwire cache? I have no idea where else to look.
    I have the original hosts outside of MAMP in the folder /sites/..., and also SQL backups from phpMyAdmin, – is there a possibility to restore single projects from it? PW reinstallation, importing of a database, ... is there a possibility to rebuild projects with these data?

  12. Google sends me an e-mail with a reference to an error:

    Incorrect structure: “}” or name of the object member is missing

    I searched through my files manually, but can't find any unopened tags. Debug logs shows no error.
    The page has a problem with a logo that is not displayed when the page is called up. As soon as I click on a link, it is displayed. The code of the embedded logo is correct, I am sure, because it is used frequently.

    Is there a way to locate such an error localhost?

  13. @da² Yes, I edit pages in the admin area. In the template I have a textarea field / CKEditor.
    I don't have hooks for the editor. I have custom styles, saved in the CKEditor field > extraAllowedContent. The styles are displayed and works fine. I think that's not the problem.

    /site/templates/assets/ckeditor/ckeditor.css
    ckeditor:/site/templates/assets/ckeditor/ckeditor.js

    With a change of the 'public function set($key, $value) …' code I get the same error message, it makes no difference. I cleared the cache, what else can I do?

    What more? config: I added own styles to the editor which change the appearance of the RepeaterMatrix links. RepeaterMatrix links doesn't look very nice, so I set them as buttons. No big deal, just CSS, no JS or PHP.

    $config->styles->add($config->urls->templates . 'assets/css/admin.css');

    I activated and deactivated the ACF settings ... the error message remains. When I delete the field and create a new one, will I probably lose all entries from the database?

  14. PHP 8.3
    ProcessWire 3.0.229

    I get this error message in the CK Editor when I select a page for editing:

    Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/username/Sites/project.com/wire/modules/Inputfield/InputfieldCKEditor/InputfieldCKEditor.module on line 205

    How do I get rid of this message?

×
×
  • Create New...