We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53178
    • 24 Posts
    Hi,

    This is an update or continuation of this issue i am having, Link:
    https://forums.modx.com/thread/101926/articles-not-showing-articles-children?page=2#dis-post-549598

    So update:
    I have used articles add on to create news and blogs. The blogs is working, it lists out all the single article blogs, front end it displays the news.
    But News, it shows blank for listing single article news, "no data to display". I can add a news article by clicking "new article" button, on the front end the news is displaying properly but in the backend, the listing of the news articles is blank.

    NOW:
    In news articles, when I click on it, it DOES NOT list the children. BUT when I click on the header "Published on" and I sort ASC or DESC the children/articles show. When I try the same to sort the article title, that's when it hangs and the loader spinner continues on end. So issues I see:
    [ul]
    [li]I have deleted VersionX addon and deleted core/cache but I still see a tab for VersionX on each resource. How do i get rid of it completely? [/li]
    [li]This error is still persistent.
    [2017-03-21 14:30:18] (ERROR in modContext::makeUrl @ /**/core/model/modx/modcontext.class.php : 321) Resource with id 52 was not found in context mgr
    

    Resource 52 is the News in question. I KNOW IF I DONT RESOLVE THIS IT WILL COME BACK IN THE FUTURE TO COME TO HAUNT ME. [/li]
    [li]If we can't solve the issue of children articles not showing, how do I make articles default to "published on" view when one clicks on news [/li]
    [li]Do you think the issue is with the new modx 2.5.5?[/li]
    [/ul]

    Things I have tried:

    • Rolling back to the last known state. But after a number of articles uploaded, it starts the issues again
    • Tried deleting versionX add on
    • Cleared core/cache. Cleared cache and refreshed URLs
    • Went to the DB and deleted a duplicate article
    • Reinstalled Articles, getResources, Quip, getPage, taglister & archivist
    • Checked the DB and some articles are picking up special characters like TM "Algeria’s Hassi Messaoud" . Deleted some of those article from the DB but didn't work. Also these characters show up in some articles and not all. Can i control it with FURL Alias Character Restriction Pattern?

    PLEASE HELP. As you can see I have tried the solutions posted here in forums but they are not working. Don't let my faith in Modx die.
      • 36818
      • 119 Posts
      Hi jsheke,

      I had similar issues. And always there was a special character problem. Unfortunately I never found out what kind of character it was.
      You can try to unpublish all articles via DB directly and test, if it works again. Then step by step activate the articles again.

      best.
      Fabian
        • 42139
        • 5 Posts
        Hi there,
        we have a similar problem. After change the PHP version to 7 nothing displayd in the list. In the search for a solution i found something interesting, when i change all the publishddates "publishedon" in DB to a date not in march i get the items displayd in Articles. I think there is a problem with the march because in Germany is written März. The dates are saved as int like 1500647760. Not very easily to debug.

        Anybody got any clues?

        mfg TOBE
          • 3749
          • 24,544 Posts
          That could be a character set issue. https://bobsguides.com/convert-db-utf8.html
            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
            • 42139
            • 5 Posts
            Thanks Bob, but our DB is still on utf8_general_ci... i am a bit confused. i have no clue where the problem comes from... in a simple blank installation it works fine...
              • 42139
              • 5 Posts
              strange!? i exported all childs from Articel with SQL. then i changed the parent id and imported into a fresh installation also with PHP 7 same modx version... There the blog shows the full list in the backend, no problem ... so i thought ok, i deletet the Blog, then uninstalld the Articles... deleted the all files on server. Renew cache... then install articles new and import the hole stuff in the new parent... like i did before with the testsystem... but same sh... like before... no child list :-(
                • 3749
                • 24,544 Posts
                Make sure that utf8 is also specified in the core/config/config.inc.php file, and check the character set of the specific tables and any text fields in the DB with PhpMyAdmin.

                Other than that, I can't think what would be causing this.
                  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
                  • 42139
                  • 5 Posts
                  sooo ... back to the "problem". thx bob but all you said is set to utf8,

                  config:


                  DB:


                  Settings:


                  or did i miss something?
                    • 42139
                    • 5 Posts
                    OK, i found the the troublemaker file:

                    /core/components/articles/processors/article/getlist.class.php

                    181     /**
                    182      * @param xPDOObject|Article $object
                    183      * @return array
                    184      */
                    185     public function prepareRow(xPDOObject $object) {
                    186         $resourceArray = parent::prepareRow($object);
                    187
                    188         if (!empty($resourceArray['publishedon'])) {
                    189                 $publishedon = strtotime($resourceArray['publishedon']);
                    190             $resourceArray['publishedon_date'] = utf8_encode(strftime($this->modx->getOption('articles.mgr_date_format',null,'%b %d'),$publishedon));
                    191             $resourceArray['publishedon_time'] = strftime($this->modx->getOption('articles.mgr_time_format',null,'%H:%I %p'),$publishedon);
                    192             $resourceArray['publishedon'] = utf8_encode(strftime('%b %d, %Y %H:%I %p',$publishedon));
                    193         }
                    


                    here i changed line 190 and 192, they get a utf8_encode(...).
                    Now my blog is back in the overview ...

                    Maybe there is a better way. After update this change will be lost. Any ideas?
                      • 3749
                      • 24,544 Posts
                      I can't think of another way, though Articles is seldom updated.
                        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