New theme selector bugging out

Hello, the new theme selector is causing me a headache. I have the following problems:

  • Project themes not showing up
  • Project themes showing up in different projects
  • Project properties stuck on previous opened projects

Please fix this!

Las propiedades del proyecto son un desastre, no funciona la selección de imágenes y no funciona el selector de temas ¡ah! y no des guardar y cambiar a otro proyecto que te conservará el anterior en propiedades

The bug with Themes in Project Properties is becoming very SEVERE. Our projects were imported from version 9.13.xx, and Scriptcase doesn’t allow us to load the project themes. It can’t display them for selection; it gets stuck in an infinite loop in Project->Properties->Themes. Because it can’t access the themes used in the project, when an application is modified, it can’t find the existing theme and applies the default theme from Properties->Themes, which in my case is scriptcase__NM__Sc9_SoftCloud_sm, the only theme that is recognized.

For your information, projects generated as new or created directly with version 10 do display the theme selection, but those imported from version 9.13.xx do not.

This situation is untenable. We can’t maintain our applications because the themes will change in production when they are published. Please update this bug; it’s extremely serious.

Still waiting this fix, but … I hope this 10.1 v. should come with the fix.

August 18th, and still no fixes or patches

I’m starting to get seriously pissed off; they’re causing serious damage.

in
/var/www/html/scriptcase/devel/lib/js/_sc_cache_sc_theme_multicombo_10.0.002.js

replace
function loadAjaxThemes() {
and
function mergeThemeCatalog(arr) {

Replace with the functions in the attached file. CLEAR CACHE and make a copy of your projects before using.

errorCargaTemas.js (2.7 KB)

    function loadAjaxThemes() {
    if (!config.ajaxUrl) { return; }

    if (typeof jQuery === 'undefined') {
        finishThemeLoading();
        return;
    }

    jQuery('.sc-theme-multicombo-loading').show();
    jQuery('.sc-theme-multicombo-arrow').hide();

    jQuery.ajax({
        type: 'POST',
        url: config.ajaxUrl,
        data: config.ajaxData || '',
        success: function (retorno) {
            var arr_schemas = retorno;

            // Si viene como string de texto, se limpia y se parsea
            if (typeof retorno === 'string') {
                var textoLimpio = retorno.trim();

                // Si trae etiquetas como <script> al inicio, intentamos extraer solo la parte JSON [ ... ]
                if (textoLimpio.indexOf('<') !== -1) {
                    var inicioArray = textoLimpio.indexOf('[');
                    var finArray = textoLimpio.lastIndexOf(']');
                    if (inicioArray !== -1 && finArray !== -1) {
                        textoLimpio = textoLimpio.substring(inicioArray, finArray + 1);
                    }
                }

                try {
                    arr_schemas = JSON.parse(textoLimpio);
                } catch (e) {
                    console.error("Error al parsear el JSON recibido:", e, retorno);
                    return;
                }
            }

            if (Array.isArray(arr_schemas)) {
                mergeThemeCatalog(arr_schemas);
            }
        },
        error: function (xhr, status, error) {
            console.error("Error en la petición AJAX:", status, error);
        },
        complete: function () {
            finishThemeLoading();
        }
    });
}

function mergeThemeCatalog(arr) {
    if (!arr || !arr.length) { return; }

    var byValor = {};

    // 1. Guardar los existentes
    (temasScriptcase || []).forEach(function (tema) {
        if (tema && tema.valor) {
            byValor[tema.valor] = tema;
        }
    });

    // 2. Unir/Sobrescribir con los nuevos del AJAX
    arr.forEach(function (tema) {
        if (tema && tema.valor) {
            byValor[tema.valor] = tema;
        }
    });

    // 3. Reasignar a la variable global del módulo
    temasScriptcase = Object.keys(byValor).map(function (key) {
        return byValor[key];
    });

    // 4. Forzar el renderizado de la interfaz
    montarListaTemas(false);
    atualizarEstadoOpcoes();
}

Checked!!, the fix posted by derazo works!!! , checked new project and modify project theme on properties

Alright, Derazo—tell me, did they refund the cost of the license for doing their job?

jejejej I was wondering the same!