Nigel
Supporter
Les langues:
Anglais (English )
Espagnol (Español )
Fuseau horaire:
Europe/London (GMT+00:00)
When you complete the steps I described there will no longer be a Writer post type (or, at least, any such posts will become redundant).
It was an intermediate post type used to simulate a many-to-many relationship between articles and members.
After merging the relationships as described there will be a true many-to-many relationship directly between articles and members, without the need for the intermediate writer post type.
So to display a member profile you will display it directly, not via the writer posts.
If you are showing an article (on its own, or in a list of articles), then you can create a View to display the member profile which is related to the article (using a relationship Query Filter), and then output fields directly from the member post without having to use the id="$member" attribute you needed to previously.
(I think I mentioned that doing the complete migration the right way would involve not just updating the relationships, but also the forms and Views that depend upon them.)
Don't hesitate to keep asking questions. It's not your fault the backwards-compatibility failed at some point, so I'm happy to give you whatever help you need.
Hi Nigel,
We are getting there. Slowly but surely. 🙂
So I have the Add Writers displaying correctly and displaying for more then one article which is great (see attached screenshot). I have regenerated the Post Forms, both add new and edit. I have your new code in place.
I can connect an existing Member Profile on the backend to an article that was previously created which is great so I know I can reconnect all the old articles to their Members when it comes time.
Now the bad news, when I create a new article with the Post Form (Cred) the member is not automatically being connected to the article like we hoped. I know I can do this in the backend but the Members to this site will not have access to the backend and they only see the Cred forms on the frontend.
What should we try next to get members connecting to their articles on the frontend working again?
Thanks,
Ron
Nigel
Supporter
Les langues:
Anglais (English )
Espagnol (Español )
Fuseau horaire:
Europe/London (GMT+00:00)
OK, let me re-test the code I proposed on my local copy of your site to double-check that it works.
I'll get back to you a little later this morning.
Nigel
Supporter
Les langues:
Anglais (English )
Espagnol (Español )
Fuseau horaire:
Europe/London (GMT+00:00)
This appears to be working on my local copy of your site with the code I provided.
I logged in as webvisuals. That user has a member profile ID=4519 of Ron Ford.
I went to the page /my-account/create-new-article/ which contains form ID 3633 "New AAIMCo Article".
I submitted an article.
From some debug info I added I could see that the code I provided correctly identified id=4519 as the member profile post belonging to my user and it tried to connect that profile to the post I just published.
In the backend I found the article I just published and edited it to verify that the connection was successful, and as you can see in the screenshot, it was.
Can you confirm whether the problem you are having is with connecting the article and the profile (check the posts in the backend) or whether it is with displaying the connection on the front end?
I might need to get an update of your site to verify the changes you've made so far, but let me know about the above first.
Hi Nigel,
I did a video to show you what I'm doing and where it breaks down.
lien caché
Since we are working on a backup feel free to go in on my site and bang away on it. If things break I have a backup that I could restore with.
thank you for your help.
Ron
Nigel
Supporter
Les langues:
Anglais (English )
Espagnol (Español )
Fuseau horaire:
Europe/London (GMT+00:00)
OK, well I'm happy to report that the explanation was very simple: you had added a code snippet, but not activated it (screenshot).
I activated it, than repeated the test from your video, and the profile was assigned to the new article.
(Boy was that a tough captcha, though, I had to click through well over 10 sets of images).
So... is there any left to fix?
My issue is resolved now. Thank you! I will have to retrain my brain on how to work with this new way of doing relationships with Toolset and cred forms. Thanks to Nigel I have a good start!