I am trying to: Set a relationship between a skill and a effect.
Link to a page where the issue can be seen: hidden link
For example The Skill Yeti Light Slot 2 Heavy Slash, should show Effect relationship to the Effect Stun.
I expected to see: What Effect was connected to this Skill
Instead, I got:
If I look at my Effect Post, it shows me it is connected to several skills which is correct. However if I go to one of the skills that is connected to this same effect it says:
The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.
an email saying:
Error Details
=============
An error of type E_ERROR was caused in line 220 of the file /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/m2m/association/intermediary_post_persistence.php. Error message: Uncaught Error: Call to a member function get_element() on null in /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/m2m/association/intermediary_post_persistence.php:220
Stack trace:
#0 /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php(1102): Toolset_Association_Intermediary_Post_Persistence->create_empty_association_intermediary_post(NULL)
#1 /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php(598): Types_Page_Extension_Meta_Box_Related_Content->check_field_integrity(Array, 10577, Object(Toolset_Relationship_Definition))
#2 /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php(561): Types_Pag
Was send to my inbox.
Additional information:
Not every skill has an effect connected to it. I imported the skills and their effects with the WPAllImport Pro Beta version for Toolset Types. First time importing everything worked fine, however the relationships between the skills and the effects were forgotton so I reran the upload and made sure this time I did fill in the relationship columns. Now I cannot edit the effects because of the above error.
Hello,
I have tried the credentials you provided above, but get this error:
This site can’t be reached
test.summoners***.info took too long to respond.
And it seems there are some broken data when you import the data with WPAllImport Pro plugin.
Can you reverse the website back to original status, and follow our document to import the data again?
https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/how-to-import-data-from-a-csv-file-using-the-wp-all-import-toolset-types-add-on-plugin/
Hi Luo,
I had placed a older back-up from the frame without imports back and did as you asked.
I followed the import instruction to the letter. However the same thing keeps happening.
I've also tried to use 3 different import documents in case something would be wrong with the first, no succes.
I've setup the credentials so you can take a look for yourself.
If you check any skill you'll see the error for the relationship with effects. I'm not quite sure why the relationships won't work or what the error in the log I send before means.
Please help 🙂
I came to the conclusion that it probably has something to do with the Intermediary Posts that are not created at the import.
The connection between skills and effects is there in the effect posts, however the intermediary posts are not created untill I open one of the effect posts and see the connected skills there. Than when I open the intermediary posts these have been created only for the ones I have opened. The others aren't there.
Also the error states:
#0 /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php(1102): Toolset_Association_Intermediary_Post_Persistence->create_empty_association_intermediary_post(NULL)
That for some reason it's unable to create an empty intermediary post for the relationship.
I have 3 relationships on my website
Monsters > Skills = One Monster has 3/4 different skills but all monsters have skills.
Monster > Leaderskill = Some monsters have 1 leaderskill but not all.
Skills > Effects Skill > Effects = Because a skill post can belong to several skills. And a skill can have several effects.
Now only the last relationship is giving me trouble. All the other connections appear to be working just fine.
I'm not entirely sure however if this is a problem with toolset view as the email suggests, or if the problem is with the WPAllImport Toolset Beta Plugin? Perhaps it has difficulties with many to many relationships.
Thanks for the details, I can log into your website, but this test site is very slow.
Here are what I found:
Edit one of "Skill Effect Intermediary Post", for example:
hidden link
I see lots of errors in my Chrome browser console window:
Uncaught ReferenceError: wptCallbacks is not defined
at HTMLDocument.<anonymous> (validation.js?ver=3.4.2:432)
at i (jquery.js:2)
at Object.fireWith [as resolveWith] (jquery.js:2)
at Function.ready (jquery.js:2)
at HTMLDocument.J (jquery.js:2)
quicktags.min.js:1 Uncaught TypeError: Cannot read property 'bs_component_show_hide_button' of undefined
at window.QTags.i.getButton (quicktags.min.js:1)
at ToolsetCommon.BootstrapCssComponentsQuickTags.self.add_bootstrap_components_buttons (toolset-bs-component-buttons.js?ver=5.2.2:122)
at toolset-bs-component-buttons.js?ver=5.2.2:21
at d (toolset-event-manager.min.js?ver=1.0:1)
at Object.j [as doAction] (toolset-event-manager.min.js?ver=1.0:1)
at HTMLDivElement.<anonymous> (toolset-bs-component-events.js?ver=1:213)
at Function.each (jquery.js:2)
at toolset-bs-component-events.js?ver=1:209
at underscore.min.js:1
wp-auth-check.min.js:1 Uncaught TypeError: Cannot read property 'hasClass' of undefined
at HTMLDocument.<anonymous> (wp-auth-check.min.js:1)
at HTMLDocument.dispatch (jquery.js:3)
at HTMLDocument.r.handle (jquery.js:3)
at Object.trigger (jquery.js:3)
at Object.a.event.trigger (jquery-migrate.min.js:2)
at HTMLDocument.<anonymous> (jquery.js:3)
at Function.each (jquery.js:2)
at a.fn.init.each (jquery.js:2)
at a.fn.init.trigger (jquery.js:3)
at Object.<anonymous> (heartbeat.min.js:1)
So the problem is abnormal, there might be some broken data while you import with "WPAllImport" plugin.
Please try these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets, and test again
2) Provide below files:
- a copy of your website(older back-up from the frame without imports back)
https://toolset.com/faq/provide-supporters-copy-site/
- the demo csv file you are going to import
You can put them into your own google drive disk, and share the link in below private message box, I need to test and debug it in my localhost, thanks
Thanks for the details, I am downloading the files, will update here if there is anything found.
The duplicator package file "20190718_summonerswarinfo_6d3090a46e84af9b1246_20190718073920_archive.zip" is broken.
I have tried to download it from google drive few times, and can not even open it, please check this file, make sure it is a valid ZIP file, then update this thread again, thanks
Hi Luo,
Sorry for the inconvenience I reuploaded it as archive.zip I think it broke because of the naming from duplicator.
I tested and it seems to work now after downloading. It's available on the same link.
Hope you find something!
Thanks in advance
Thanks for the details, I can install the new package file, will update here if there is any found.
Thanks for the details, please try these:
1) edit your CSV file, in column "ID", populate an unique number for each row, for example:
1, 2, 3...
2) While you import the CSV file with WPAllImport Pro plugin, there are two issues need to be pay attention:
a) in step 3) , enable section "Toolset Types Add-On":
option "Skill Effects": fill below values:
{effect1[1]}
{effect2[1]}
{effect3[1]}
{effect4[1]}
{effect5[1]}
b) In step 4) , option "Unique Identifier", use below value:
{id[1]}
I have tested above settings in my localhost it works fine.
Hi Luo,
I followed your instruction to the letter
I edited the CSV and added the numbers 1-1718 in front in the columns ID.
Than I created a new Import, for New Items, set the fields in step 3. I set the Effects with the , as a seperator in step 3 under skill effects. And than in step 4 I left ID as a identifier.
Same results
I got another email saying the same error:
Error Details
=============
An error of type E_ERROR was caused in line 220 of the file /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/m2m/association/intermediary_post_persistence.php. Error message: Uncaught Error: Call to a member function get_element() on null in /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/m2m/association/intermediary_post_persistence.php:220
Stack trace:
#0 /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php(1102): Toolset_Association_Intermediary_Post_Persistence->create_empty_association_intermediary_post(NULL)
#1 /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php(598): Types_Page_Extension_Meta_Box_Related_Content->check_field_integrity(Array, 8179, Object(Toolset_Relationship_Definition))
#2 /home/u4346p2664/domains/summonerswar.info/public_html/test/wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php(561): Types_Page
Any other idea why this would be happening? The Error message isn't very clear to me either all I can figure from it is that it has issues with the intermediary posts.
Hi Luo,
Seeing as your local host does not duplicate the problem I asked my hosting provider to take a look at what they could find.
They said the following:
The issue appears to be because of the lines:
/**
* Creates an empty association intermediary post
*
* @param IToolset_Association $association Association.
* @return int Post ID
* @since m2m
*/
public function create_empty_association_intermediary_post( $association ) {
$intermediary_id = (int) $this->create_intermediary_post(
$association->get_element( new Toolset_Relationship_Role_Parent() )->get_default_language_id(),
$association->get_element( new Toolset_Relationship_Role_Child() )->get_default_language_id()
);
if ( $intermediary_id ) {
$database_operations = new Toolset_Relationship_Database_Operations();
$database_operations->update_association_intermediary_id( $association->get_uid(), $intermediary_id );
}
return $intermediary_id;
}
Apparantly this function cannot find a default language id? They're not programmers so they weren't sure but that's how they interpreted the error log that's send by wordpress once the export is being imported.
Perhaps you can advice me on your php settings so I can compare those to mine?
Hope you can still help me figure this out!
Thanks for all the help, I decided to put back a back-up from 60 day's ago and that solved the problem.
Any new installation I tried to do on several sub domains resulted in the same error on line 220.
I'm not sure why, but the older wordpress and plugin versions don't seem to have that problem.
Either way I can continue for now with my site. Perhaps not the ideal solution but it's fixed for now.
Hi,
same problem here.
When i try to edit a custom post type item a relationship seems to to be broken.
The relationship is many-to-many Edizioni [*] << Edizioni Partners >> Partners [*].
Another strange thing is that the error is present when i try to edit a item from "Edizioni" all seems to be ok, when i try to edit ad item from "Partners" the error message is shown.
It seems to be happened after the last wordpress update but i'm sure about the relationship.
All toolset plugins are updated to the last version available.
I used wp all import several time to import data, then i add other items manually via backend.
I am frustrated the idea to start from scratch and re-import the data.
The site contains six relationships, only one of this seems to be broken.
----------------------------------------
Uncaught Error: Call to a member function get_element() on null in
[...]wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/m2m/association/intermediary_post_persistence.php on line 220
create_empty_association_intermediary_post()
wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php:1142
check_field_integrity()
wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php:607
format_field_data()
wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php:570
get_related_content()
wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php:359
build_js_data()
wp-content/plugins/types/application/controllers/page/extension/related_content/meta_box_related_content.php:478
build_metabox_context()
wp-content/plugins/types/application/controllers/page/extension/meta_box.php:206
render_meta_box()
wp-admin/includes/template.php:1343
do_meta_boxes()
wp-admin/edit-form-advanced.php:700
include()
wp-admin/post.php:198