We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52990
    • 7 Posts
    Description of Problem:
    I get 500 Internal Server Error (with empty contents: <html><head></head><body></body></html>) on action resource/update in Manager and specified existing resource ID.
    On absent resource ID it outputs usual Manager with "Resource ... not found" message.

    Steps to Reproduce:
    As always I was trying to edit resource in separate view by just clicking on it in the tree. URLs of type, that are enlightening backend problems: "/manager/?a=resource/update&id={any_existing}"
    where {any_existing} - 1, 2 or other ID of existing resource.

    Expected Outcome:
    Usual Manager with resource edit form.


    • MODX Version: MODX Revolution 2.5.7-pl (traditional)
    • PHP Version: 7.1.5
    • Database (MySQL, SQL Server, etc) Version: MySQL 5.6.35-81.0
    • Installed MODX Add-ons: CKEditor, CodeMirror, Collections, cssSweet, getDate, getResources, If, pThumb, Rampart, resizer, translit.
    • MODX System settings: debug = 1.
    • Error log is so empty.


    I was iterating through these solutions, but it doesn't help:

    • Clear site cache
    • Clear "/core/cache/"
    • Set system settings: use_editor = 0, which_editor = 0
    • Ignore Collections plugin execution by switching off its events as OnManagerPageInit, OnManagerPageBeforeRender, OnDocFormRender
    • Set system settings: compress_css = 0, compress_js = 0
    • Repair tables in database
    • Deinstall CKEditor and Collections
    The most tricky error!

    This question has been answered by vintproykt. See the first response.

    [ed. note: vintproykt last edited this post 9 years, 1 month ago.]
      • 3749
      • 24,544 Posts
      Do you have the compress_css and compress_js System settings off?

      Have you tried from another browser?

      Have you recently modified MODX permissions?

      Try repairing all DB tables in PhpMyAdmin

      Try Chrome or Firefox tools (Ctrl-shift-i). Watch the network tab. Also watch for JS errors.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 52990
        • 7 Posts
        Thank you for fast response, BobRay!

        Quote from: BobRay at Aug 06, 2017, 10:13 PM
        Do you have the compress_css and compress_js System settings off?
        No, they are switched on. Switched them off and nothing changed.

        Quote from: BobRay at Aug 06, 2017, 10:13 PM
        Have you tried from another browser?
        Yes, same thing with IE and Firefox, because this error is independent on user agent. Chromium is first.

        Quote from: BobRay at Aug 06, 2017, 10:13 PM
        Have you recently modified MODX permissions?
        allow_tags_in_post = 1 for mgr context and allow_tags_in_post = 0 in common settings. No other permissions tricks, I have wide
        permissions.

        Quote from: BobRay at Aug 06, 2017, 10:13 PM
        Try repairing all DB tables in PhpMyAdmin
        Repaired every table right now. Didn't help.

        Quote from: BobRay at Aug 06, 2017, 10:13 PM
        Try Chrome or Firefox tools (Ctrl-shift-i). Watch the network tab. Also watch for JS errors.
        General
        + Request URL:https://censored.ru/manager/?a=resource/update&id=1
        + Request Method:GET
        + Status Code:500 Internal Server Error
        Response Headers
        + Cache-Control:no-store, no-cache, must-revalidate
        + Connection:keep-alive
        + Content-Length:0
        + Content-Type:text/html; charset=UTF-8
        + Date:Mon, 07 Aug 2017 07:45:07 GMT
        + Expires:Thu, 19 Nov 1981 08:52:00 GMT
        + Pragma:no-cache
        + Server:nginx
        + X-Powered-By:PHP/7.1.5
        Request Headers
        + Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
        + Accept-Encoding:gzip, deflate, br
        + Accept-Language:ru,en;q=0.8
        + Cache-Control:no-cache
        + Connection:keep-alive
        + Cookie:censored
        + Host:censored.ru
        + Pragma:no-cache
        + Referer:https://censored.ru/manager/
        + Upgrade-Insecure-Requests:1
        + User-Agent:Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.censored (KHTML, like Gecko) Chrome/59.0.cen.sored YaBrowser/17.7.cen.sored Yowser/2.5 Safari/537.36
        Query String Parameters
        + a:resource/update
        + id:1
        

        No JavaScript errors occuring on this and other pages. [ed. note: vintproykt last edited this post 9 years, 1 month ago.]
        • discuss.answer
          • 52990
          • 7 Posts
          I finally found the problem: I was playing around with template variables: one for selecting `manufacturer` from list of resources that have TV `is_manufacturer` set to 1 in parent `Manufacturer and Vendors`.

          @EVAL return $modx->runSnippet('listManufacturers');
          


          // [[listManufacturers]]
          <?php
          return '(не указан)==0||'. $modx->runSnippet('listResources',['parent' => 24, 'where' => [ 'is-manufacturer' => true );
          


          I totally forgot about it before posting issue on forum. It was with bad code of snippet `listManufacturers`.

          So this one is solved! smiley [ed. note: vintproykt last edited this post 9 years, 1 month ago.]
            • 3749
            • 24,544 Posts
            I'm glad you got it sorted. smiley
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting