• Holiday Schedule

    Your code gophers will be away for the next couple of weeks so support will be sporadic. We should be fully back online by the end of September.

  • A new version of Full Calendar is now available.

    See the details here

Smart Search indexing fails

Status
Not open for further replies.

liga

Member
Running Joomla 4.4.1, PHP 8.2.13, Fabrik 4.0 Zeta

When re-indexing (Back-end, Components > Smart Search > Index > Index), this error message is given:

Code:
An Error Has Occurred
The following message was returned by the server:
A parse error has occurred while processing the following JSON data:
Unexpected non-whitespace character after JSON at position 516 (line 1 column 517)

The response to the latest AJAX request contains a valid JSON block, followed by some JavaScript code wrapped in a <script> HTML tag:

Code:
{
    "buffer": null,
    "memory": null,
    "error": null,
    "header": "Optimising Index",
    "message": "The index tables are being optimised for the best possible performance. Do not close this window.",
    "batchSize": 75,
    "batchOffset": 60,
    "totalItems": 0,
    "pluginState": {
        "Categories": {
            "total": 63,
            "offset": 63
        },
        "Contacts": {
            "total": 15,
            "offset": 15
        },
        "Content": {
            "total": 873,
            "offset": 873
        },
        "Newsfeeds": {
            "total": 1,
            "offset": 1
        }
    },
    "startTime": "2023-12-20 08:53:11",
    "endTime": "2023-12-20 08:53:17",
    "start": 0,
    "complete": 0
}<script>setTimeout(function(){
    jQuery.ajaxSetup({
        cache: true
    });jQuery.getScript("https://MYSITE.COM/media/com_fabrik/js/lib/require/require.js",
    function(){
        define('jquery',
        [],
        function(){
            return jQuery;
        });define('moment',
        [],
        function(){
            return moment;
        });requirejs.config({
            "baseUrl": "https:\/\/MYSITE.COM\/",
            "paths": {
                "fab": "media\/com_fabrik\/js\/dist",
                "lib": "media\/com_fabrik\/js\/lib",
                "element": "plugins\/fabrik_element",
                "list": "plugins\/fabrik_list",
                "form": "plugins\/fabrik_form",
                "cron": "plugins\/fabrik_cron",
                "viz": "plugins\/fabrik_visualization",
                "admin": "administrator\/components\/com_fabrik\/views",
                "adminfields": "administrator\/components\/com_fabrik\/models\/fields",
                "jQueryUI": "media\/com_fabrik\/js\/lib\/jquery-ui\/jquery-ui",
                "chosen": "media\/com_fabrik\/js\/dist\/chosen.jquery",
                "punycode": "media\/system\/js\/punycode"
            },
            "shim": {
                "fab\/fabrik": {
                    "deps": [
                        "fab\/utils",
                        "jquery",
                        "fab\/mootools-ext",
                        "lib\/Event.mock"
                    ]
                },
                "fab\/autocomplete-bootstrap": {
                    "deps": [
                        "fab\/fabrik"
                    ]
                },
                "jQueryUI": {
                    "deps": [
                        "jquery"
                    ]
                },
                "fab\/elementlist": {
                    "deps": [
                        "fab\/fabrik",
                        "fab\/element",
                        "fab\/form-submit"
                    ]
                },
                "fabrik\/form": {
                    "deps": [
                        "fab\/element",
                        "lib\/form_placeholder\/Form.Placeholder"
                    ]
                },
                "lib\/datejs\/core": {
                    "deps": [
                        "lib\/datejs\/globalization\/en-GB"
                    ]
                },
                "lib\/datejs\/parser": {
                    "deps": [
                        "lib\/datejs\/globalization\/en-GB"
                    ]
                },
                "lib\/datejs\/extras": {
                    "deps": [
                        "lib\/datejs\/globalization\/en-GB"
                    ]
                },
                "element\/jdate\/jdate-min": {
                    "deps": [
                        "lib\/datejs\/globalization\/en-GB",
                        "lib\/datejs\/core",
                        "lib\/datejs\/parser",
                        "lib\/datejs\/extras"
                    ]
                },
                "element\/field\/field-min": {
                    "deps": []
                }
            },
            "waitSeconds": 30
        });requirejs([
            'fab/chosen-loader',
            'fab/fabrik',
            'fab/tipsBootStrapMock'
        ],
        function(Chosen,
        Fabrik,
        FloatingTips){
            Fabrik.liveSite='https://MYSITE.COM/';Fabrik.package='fabrik';Fabrik.debug=false;Fabrik.jLayouts={
                "modal-close": "<a href=\"#\" class=\"closeFabWin\" data-role=\"close\">\n\t<span class=\"fa fa-times-circle\"><\/span>\n<\/a>",
                "icon-expand": "\n<span data-isicon=\"true\" class=\"fa icon-expand\" ><\/span>\n",
                "icon-full-screen": "\n<span data-isicon=\"true\" class=\"fa icon-out-2 icon-fullscreen\" ><\/span>\n"
            };Fabrik.bootstrapped=true;Fabrik.tips=new FloatingTips('.fabrikTip',
            {
                "tipfx": "Fx.Transitions.linear.easeIn",
                "duration": "500",
                "distance": 50,
                "fadein": false
            });Fabrik.addEvent('fabrik.list.updaterows',
            function(){
                // Reattach new tips after list redraw
        Fabrik.tips.attach('.fabrikTip');
    });
    Fabrik.addEvent('fabrik.plugin.inlineedit.editing', function () {
        Fabrik.tips.hideAll();
    });
    Fabrik.addEvent('fabrik.list.inlineedit.setData', function () {
        Fabrik.tips.attach('.fabrikTip');
    });
    Fabrik.addEvent('fabrik.form.loaded', function () {
        Fabrik.tips.attach('.fabrikTip');
    });
    Fabrik.addEvent('fabrik.list.loaded', function () {
        Fabrik.tips.attach('.fabrikTip');
    });
});


requirejs(['https://MYSITE.COM/components/com_fabrik/libs/mediabox-advanced/mediaboxAdv.js'], function () {

});


require(['fab/autocomplete-bootstrap', 'lib/Event.mock'], function (AutoComplete) {
    new AutoComplete('lik50_schedule_24_repeat___player_white_0', {"minTriggerChars":3,"autoLoadSingleResult":1,"url":"index.php?option=com_fabrik&format=raw&task=plugin.pluginAjax&69da10ed1824591c0f7fb46c0a79a7cd=1&g=element&element_id=126&formid=11&plugin=databasejoin&method=autocomplete_options&package=fabrik","max":"10","storeMatchedResultsOnly":true,"formRef":"form_11","container":"fabrikElementContainer","menuclass":"auto-complete-container"});
});
STRIPPED TO GET BELOW 10000 CHARS, SORRY
            </script>

I see references to one list/form I created, but not to others.

I have no clue what I could do next.
 
It seems you are using the Fabrik content plugin in J! articles.

Fabrik doesn't play with Smart Search and obviously Fabrik content plugins in articles are breaking the indexing.
I don't use Smart Search but testing a bit it doesn't look very "smart" to me...
You can only very roughly configure what to index, you can't exclude categories or unpublished stuff or whatever from being indexed (only afterwards from being displayed).
You can exclude indexing all content in general but I think this isn't what you want.

So can you try
plugins\content\fabrik\fabrik.php
in line 52 insert (before the line // Load fabrik language)

// Fabrik doesn't play with Smart Search indexer; don't run content plugin when indexing
if ($context == 'com_finder.indexer') return true;

I assume the indexer will then index the words fabrik, view, list etc...
 
I disabled the Fabrik content plugin, as I was no longer using it, but that didn't help. The day after, I tried again, and it was automagically fixed. I'm assuming I can blame cache for this (I didn't clean it yesterday)?

For me, this is solved. Thanks guys!
 
Status
Not open for further replies.
Back
Top