Module:LuaTemplateBlueprint: Difference between revisions

// via Wikitext Extension for VSCode
Tag: Reverted
// via Wikitext Extension for VSCode
Tag: Reverted
Line 1,045: Line 1,045:
          
          
         local cr = require('Module:ConfigRepository')
         local cr = require('Module:ConfigRepository')
       
        -- Debug: Check if CountryData module loads
        if template._errorContext then
            local ErrorHandling = require('Module:ErrorHandling')
            ErrorHandling.addError(template._errorContext, "ModuleLoadDebug",
                "Attempting to load CountryData module",
                "", false)
        end
       
         local cd = require('Module:CountryData')
         local cd = require('Module:CountryData')
       
        -- Debug: Check if module loaded successfully
        if template._errorContext then
            local ErrorHandling = require('Module:ErrorHandling')
            ErrorHandling.addError(template._errorContext, "ModuleLoadedDebug",
                string.format("CountryData loaded: %s", cd and "success" or "failed"),
                "", false)
        end
       
         local norm = p.protectedExecute(
         local norm = p.protectedExecute(
             template,
             template,
Line 1,053: Line 1,071:
             args.country
             args.country
         )
         )
       
        -- Debug: Check what protectedExecute returned
        if template._errorContext then
            local ErrorHandling = require('Module:ErrorHandling')
            ErrorHandling.addError(template._errorContext, "ProtectedExecuteDebug",
                string.format("protectedExecute returned: %s", norm and "data" or "nil"),
                "", false)
        end
         if norm then
         if norm then
             local countryKey = cr.semanticProperties.country
             local countryKey = cr.semanticProperties.country