Tagger not showing tags or rendering assigned tags on backend

Tagger used to work perfectly, but sometime between now and December it stopped (last blog post with a tag is December).

If I click the up / down arrows to expand the tags to choose from, it says “Loading…” then disappears. We do have tags in the system, I’ve verified that.

I’ve also found posts with existing tags no longer show the tags in the tagger field, they do still work on the front end.

Using tagger 1.12.0 on MODX 2.8.1

  • When you open the developer tools of your browser, are there any errors in the tab Console or the tab Network?
  • When you open the dropdown, it should create a new request to assets/components/tagger/connector.php (action = mgr/extra/gettags). Is this request successful?
  • Are there any related errors in the MODx error log?

Thank you for responding. This is interesting. So the request does some through, it even says 9, but there is no content.

That is really weird! It would mean that the query for getCount() is correct, but then fails later ($c->stmt->fetch()) to read the individual tags. What are the request parameters for start and limit?

You probably have to debug this code to get to the bottom of the problem.

There is only a setting for limit. I don’t see a start setting.

There is no setting. I meant the parameters that get sent with the ajax-request to connector.php. (You can see them in the developer tools when you click on Request in the first image you posted.)

It’s just to make sure that the line

$c->limit($limit, $start);

doesn’t alter the query.

Ok, here is what I show. Thanks again for staying with me here.

It’s just the craziest thing as to why it won’t work when it did before. I even changed one tag to remove the & symbol, sometimes those can cause issues. No luck.

This all looks ok. I can’t reproduce your problems. I am afraid I can’t help you further.

Has something changed on your system since the time it worked? PHP version, database version?

I’ve previously seen behavior like that (a count but no results) when there were invalid UTF8 characters in the content, which breaks the json generation. And also when there’s an issue with the query itself after the count which @halftrainedharry suggested.

In this case I’m 92% sure the problem is sorting by rank - that’s a reserved keyword and needs special handling. Did you not get any messages about that in the MODX error log?

Try replacing

$c->sortby($sortField,$sortDir);

with

$c->sortby($this->modx->quote($sortField), $sortDir);

in the file @halftrainedharry linked to. Went ahead and created an issue for it.

1 Like

Ding Ding Ding… we have a winner. @markh Changing the sorting from Rank to Alias did the trick.

Thank you so much!

Yay, what do I win? Trees? :smiley:

Best I can offer is my deepest gratitude and a beer if we ever meed up at a MODX Con.