We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53376
    • 32 Posts
    I transferred my site on localhost for doing some highload operations. But method setTVValue stopped to work on localhost.

    				foreach ($tvs as $tv => $value) {
    					$newdoc->setTVValue($tv, $value);
    					echo "sett $tv to $value<br>";
    				}


    Prints me:

    set link to 123
    set fragrance to asd
    set whom to fgh


    $tv and $value are existing strings. TV names is actual. But resource doesn't contains them: [see on Imgur]

    MySQL table with TV content values doesn't contains them too.

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

    [ed. note: i_am_bars last edited this post 6 years, 8 months ago.]
      • 3749
      • 24,544 Posts
      It could be a character set issue.
        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
      • discuss.answer
        • 53376
        • 32 Posts
        Quote from: BobRay at Apr 03, 2018, 06:46 PM
        It could be a character set issue.

        I guessed to see into MODX error log and there are was error about one field doesn't have default value. I removed STRICT_TRANS_TABLES from "sql-mode" MySQL setting on my local host. Solved