I'm getting a blank page when I try to load some content templates. There is a javascript error being thrown:
Uncaught TypeError: Cannot read property 'singular' of undefined
The error is on line 907 of the file wp-views/res/js/ct-editor.js:
labelSingular: ct_data.usage_post_type_labels[key].singular,
I've disabled all plugins, switched back to the default theme and at first, it was working when I was on the default wordpress theme, but now I cannot access some content templates at all, regardless of being on the default theme with only WP-Views and WP-Types activated (and all other plugins deactivated).
Thank you very much in advance for your assistance!
Thank you for contacting Toolset support, I'd be delighted to assist!
Could you please enable debug in the wp-config.php file and reload the page to display any PHP errors and paste it here? It would greatly help troubleshoot the issue. Thanks!
There aren't any PHP errors displaying for that page - debug was enabled when I took that screenshot. Thanks!
I appreciate your feedback!
To best troubleshoot the issue and to send to our developers, please make a snapshot of your site using the Duplicator plugin: https://wordpress.org/plugins/duplicator/. Once the snapshot is complete, either upload the snapshot ZIP file and the installer.php file to a file sharing service such as Dropbox (and share the link in your reply) or right click the Duplicator links in your wp-admin and paste in your reply.
I will enable the next reply to be private so only you and I have access to it!
Howdy! I was trying to download the snapshot files from your server and I'm getting a error 500 (permission denied).
Could you kindly upload the duplicator file and installer.php to a filesharing site such as Dropbox? Thank you!
Thank you for checking the links for me, they all work now!
I couldn't figure this one out, I'm going to send this over to our 2nd tier supporters and developers for troubleshooting!
Thanks Ross, I appreciate your effort. I look forward to connecting with 2nd tier support!
Hello,
We've found an argument that isn't being validated by Views in certain case. We've forwarded this to our development team. Meanwhile you can use the workaround below:
add_filter( 'wpv_ct_editor_add_custom_properties', 'journal_theme_fix_corrupted_dissident_post',50,2 );
function journal_theme_fix_corrupted_dissident_post($ct_data, $ct) {
if (isset($ct_data['dissident_posts'])) {
if (is_array($ct_data['dissident_posts'])) {
foreach ($ct_data['dissident_posts'] as $k=>$v) {
if (empty($k)) {
unset($ct_data['dissident_posts'][null]);
}
}
}
}
return $ct_data;
}
Please let me know if you are satisfied with my reply and any other questions you may have.
Regards,
Adriano Ferreira
Thank you so much! That seems to have worked - if there is a more permanent solution I should implement in the future, please do let me know. Thank you again!!
Hello! I'm not sure if I should start a new thread - happy to do so, but I think I have another related issue. I'm now returning to the website for the first time since applying the fix and I'm having trouble with the following:
- Saving an existing view after making changes to any part of the view;
- Creating a new view and saving it (after clicking "Finish" in the loop wizard box, it freezes with the saving spinner perpetually spinning);
I've attached a screenshot of the js error that is being thrown.
Thank you very much in advance for your assistance!