Open Jimmi08 opened 5 years ago
Yes, this seems to be a core-related issue.
Do you have any idea on this? :)
moved to core issues.
EDIT: I found it. It was caused by installation tagwords plugin (by mistake, I don't use it on live site). So I can continue. Sorry for panic.
I think that this happens only with update to 1.6. On e107.org there is only 1.3 version. No errors, but there are not hashed data.
EDIT: is there... after saving record with metatags, it happens with reedit...
This problem is only with 'download-category-list' type. Only with type are data saved wrong way.
Thank you for effort! How can I reproduce this? I enabled debug mode, and modified all kind of meta tags, but no errors.
Fresh install (deleted metatag tables) go to metatag admin edit default metatag for anything save edit again
Got it! I had to enable debug mode. Now I see the error. I'll try to use e107::serialize($data, 'json')
instead of e107::serialize($data)
Well, the error message is at least shorter. :D I think we should use own serialize/unserialize functions instead of core ones.
e107::unserialize()
is buggy if json encoded data contains "{" (tokens begins with this char), because it is trying to decode the already decoded string:
if(substr($ArrayData,0,1) === '{' || substr($ArrayData,0,1) === '[') // json
{
$dat = json_decode($ArrayData, true);
// e107::getDebug()->log("Json data found");
if(json_last_error() != JSON_ERROR_NONE && (e_DEBUG === true))
{
echo "<div class='alert alert-danger'><h4>e107::unserialize() Parser Error (json)</h4></div>";
echo "<pre>";
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
echo "</pre>";
}
return $dat;
}
EDIT: No, not. There will be something else here.
deleted, you found it yourself that it's not that case.
If you add default data to $config['download-category-list'] , problem is solved.
// Download - Category list page.
$config['download-category-list'] = array(
'name' => LAN_PLUGIN_METATAG_TYPE_11,
'detect' => 'metatag_entity_download_category_list_detect',
'load' => 'metatag_entity_download_category_list_load',
'file' => '{e_PLUGIN}metatag/includes/metatag.download.php',
'default' => array(
'title' => '{site:current-page:title} | {site:name}',
'description' => '{site:description}',
'generator' => 'e107 v2 (http://e107.org)',
'canonical' => '{site:current-page:url}',
'fb:app_id' => '{site:fb-app-id}',
'og:site_name' => '{site:name}',
'og:url' => '{site:current-page:url}',
'og:title' => '{site:current-page:title}',
),
'dependencies' => array(
'plugin' => 'download',
),
);
so it is something with entities when default data are not defined. I would solve it this way to move forward.
I know you are working on it, but there was similar problem before, so maybe this is related to core.
Installed latest version, run update to 1.6.
https://github.com/e107inc/e107/issues/3693
$data:
PATH: /e107_plugins/download/admin_download.php?mode=main&action=list