Jump to content

esl

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by esl

  1. Hello!

    I'm trying to render a specific page (based on the URL) if the page is not found, using a hook in my module. But now I am faced with the fact that I can not use the "echo $p->render()" inside the hook because of incompatibilities with other modules (MarkupSEO).

    How and where do I hook "Page::render" to avoid rendering directly inside hook "ProcessPageView::pageNotFound".

    In short, I need to catch 404 error and instead of rendering error page - render another page with a status of 200, while using the hook "Page::render".

    public function init() {
        parent::init();
        $this->addHookBefore('ProcessPageView::pageNotFound', $this, 'checkForceURLs');
    }
    
    public function checkForceURLs($event) {
        $event->replace = true;
        // ... Defining $p - page i need to render
        echo $p->render();
        return;
    }

     

  2. 16 minutes ago, SamC said:

    @esl I think it's a bug too. Removing those values is not a solution for me neither. But I can't work out why it works at min-width 500 and not 1000.

    I need users not to be able to crop less than 2400px wide (or upload images less than 2400px wide).

    Yes, I have a similar situation. The user can upload the image size is not more than 2700x1800 (memory limit on server), but at the same time, he must use the images of at least 1920x330, as they are in this resolution will be presented on the site. And this error occures when I try to crop the uploaded image of size 1920x1280 to a minimum (1920x330).

  3. 1 minute ago, SamC said:

    @esl I believe these are causing your problems.

    Yes, I also pay attention to it, but not well tested. Thank you for this. But I'm trying to crop the image to the minimum allowable values, it should not be a problem, I think. I'm loading an image that fits within the constraints. After all, it is a bug? As a workaround, we can remove the restrictions, but it is not an solution, I think.

  4. Export of field:

    {
        "header_image": {
            "id": 145,
            "type": "FieldtypeImage",
            "flags": 0,
            "name": "header_image",
            "label": "Изображение в шапке",
            "textformatters": [
                "TextformatterEntities"
            ],
            "extensions": "gif jpg jpeg png",
            "maxFiles": 1,
            "outputFormat": 0,
            "defaultValuePage": "",
            "inputfieldClass": "InputfieldImage",
            "descriptionRows": 1,
            "gridMode": "list",
            "maxWidth": 2700,
            "maxReject": 1,
            "minWidth": 1920,
            "minHeight": 330,
            "fileSchema": 2,
            "collapsed": 0,
            "maxHeight": 1800,
            "outputString": "",
            "entityEncode": "",
            "useTags": "",
            "showIf": "",
            "columnWidth": 100,
            "required": "",
            "requiredIf": "",
            "unzip": "",
            "overwrite": "",
            "noLang": "",
            "dimensionsByAspectRatio": ""
        }
    }

    Try to import header_image field to reproduce error

  5. Hi, all!

    The problem is still relevant (tested on 3.0.40, 3.0.42 and 3.0.48) in Chrome browser only (tested on version 55) when trying to crop 1920x1280 to 1920x330.

    An invalid form control with name='width' is not focusable.
    ?id=1122&file=1122,dsc0828_obrez.jpg&rte=0&field=header_image&modal=1

    Chrome can't focus hidden input with name="width" (which used for scaling, not for cropping).

  6. I apologize for my English (or GoogleTranslate's English :)  ).

    Tried to search, but found nothing.

    Revealed the following problem:

    AutoComplete does not work if the page title contains Cyrillic characters. Checked by creating a page with English titles - they are displayed normally. Just tried in the advanced settings autocomplete select the "^=" mode. This leads to the fact that the list displays all the Cyrillic titles, regardless of the characters entered.

    Maybe I'm doing something wrong.

    Please help.

    --------


    It helps me.

    --------

    One else question: can I use Autocomplete to select single page? What should i do?

    Thanks to all who participated in the development of this great CMS!

    • Like 1
×
×
  • Create New...