Sauter la navigation

[Résolu] Split: I need to insert the Form edit link to menu-registration form and view

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

The users are redirect to the page to add the photo, but instead to see the form, I see the "Permission danied" message.

Solution:

It is using custom shortcode:

[cred_form form='aggiungi-foto' post="[get_profile_author_id]"]

But the custom shortcode [get_profile_author_id] does not work, it output empty result.

Relevant Documentation:

This support ticket is created Il y a 6 années. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Marqué : 

Ce sujet contient 14 réponses, a 3 voix.

Dernière mise à jour par francescoG-3 Il y a 5 années et 11 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1181292

Hi, thanks for the solution, but now I have the following issues:

I have created the User Registration Form (lien caché), where the role assigned to users after the registration is a custom role called "Stato Base". After the user registration form submission the new user is redirect to the login page (lien caché). After the user login the users are redirected to a specific page to create a Profile CPT Post with a specific Form managed with View where the filter is "Seleziona i post che hanno come autore l' utente attuale registrato." and the View code is

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>
          [wpv-post-body view_template="modello-di-contenuto-perprofili"]
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"][cred_form form="mio-profilo-form-crea"][/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

And so, if the user don't have created the Profile CPT post, the user display the Form to create the Profile CPT post (lien caché the new page name will be mio-profilo). After the submission, the Profile CPT posts are not published but setted to "in revision", and the users are redirect to the page to add the photo (incontramici.inonda.tv/edit-user-profile/) but instead to see the form, I see the "Permission danied" message.
In Access all settings are ok...

Else, if the user have created a Profile CPT post before, in the lien caché (the new page name will be mio-profilo) the users should to see their own profiles, instead I have the Content Template with the layout that I have setted but without the custom fields values that the user have setted, and return mi this message "Il contenuto non verrà visualizzato perché produce un ciclo infinito.
Lo shortcode wpv-post-body è stato richiamato più di una volta con l'attributo view_template="modello-di-contenuto-perprofili" attraverso l'articolo "InOnda", attivando un ciclo infinito."

Why I have this issues and what shoul I do to solve them?

#1181370

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - as I understand you want to filter your view by loggedin user role - correct? If yes - I need to check why that form is not loaded.

Could you please tell me what access details I use to logged in user the role Stato Base?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#1181507
#1182116

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Well - the access details you shared is of "assistenza" user who is admin.

I need to know the access details who is registered from frontend using registration page:
=> lien caché

I see there is a user "frullato" who is assigned the role "Stato Base" - so I need that user login, as you are filtering - correct? Or it should also allow the administrator to edit?

So when login: lien caché
- It should display the posts whose post author is user "frullato" - correct?

#1182181

I need to know the access details who is registered from frontend using registration page:
=>
lien caché;
Ok, can you allow me to add a private message to send the access details? But, if you want, you can try to create a new user.

I see there is a user "frullato" who is assigned the role "Stato Base" - so I need that user login, as you are filtering - correct? Or it should also allow the administrator to edit?
So, the administrator edit the Profile CPT post about the role "Stato Base" in the back end. And, for now the issue is only for "frullato", but if the issue is for every users?

So when login: lien caché
- It should display the posts whose post author is user "frullato" - correct?
So, if the Profile CPT post is not create, after login the users need to display the Create Profile CPT post Form, if the Profile CPT post is created than after login every users need to display their own Profile CPT post. Because the users can create only one their own Profile CPT post.

#1182182

And also, I use Ultimate Membership Pro (UMP) to manage the membership. In UMP I have created 5 membership levels, where one of this is Free and the others are under payments.
So, in the UMP settings, I have setted that when a new user is registered, the system need to add to every new users the Free Level in both of the role "Stato Base". But the level is not assigned to new users. This because I use the Toolset Form for the users registration, and not the native UMP registration form.

There is a way to assign the Free Level to every new user with the role "Stato Base"?

#1182279

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Sure - Please send me access details for user "frullato" I will set next reply as private.

Is Administrators are going to edit profile using the following page?
=> lien caché

Regarding "Ultimate Membership Pro (UMP)" query - please open a new ticket.

#1183419
crea-profilo.JPG
edit-user-profile.JPG

Hello,

Minesh isn't available, I will take care of this thread. We can handle the problems one by one.

Q1) I see the "Permission danied" message.

Your website isn't in English, it is hard to debug in it, I have tried these, please correct me if there is anything missing.
1) Go to URL
lien caché

2) Login as user "frullato"

3) Go to URL:
lien caché

But there isn't "Permission danied" message, see screenshot: edit-user-profile.JPG

Q2) Same as above in URL:
lien caché
There isn't such a message:
Il contenuto non verrà visualizzato perché produce un ciclo infinito. ...

See screenshot crea-profilo.JPG

Are these problems resolved? feel free to create new thread if there is any new problem.

#1183567
2019-01-14.png

So, When I'm trying to do the login I have this (see the attached image).

Can you try to create new user? lien caché

#1184002

Thanks for the details, I have tried to register a user in your website, and can see the message "Permission denied"
in URL:
lien caché

Then I have tried to login as administrator user "assistenza" with the credentials you provided in another thread:
https://toolset.com/forums/topic/how-set-the-conditional-logic-with-user-custom-field/#post-1171241
Here are what I found, in above problem page you are using below shortcode:

[cred_form form='aggiungi-foto' post="[get_profile_author_id]"]

Your custom shortcode [get_profile_author_id] does not work, it output empty result.

In your case, it can be fixed by a simple post view without any custom codes, for example:
1) Create a post view query "Profili" posts, filter by
- Seleziona i post che hanno come autore l' utente attuale registrato
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/
- Seleziona gli articoli con lo stato di any.
https://toolset.com/documentation/user-guides/filtering-views-query-by-post-status/

in section "Editor del ciclo", display the Toolset edit form directly:
[cred_form form='aggiungi-foto']

See it here:
lien caché

2) Then put above post view into the page, and test again:
lien caché

It works fine

#1184191
2.png
1.JPG

Hi Luo,
thanks now the form work fine in page.

But is not resolved the issue to display the Current Login User Profile CPT Post in Page...
In the attached image 1 you can see what I have...
In the attached image 2 you can see what I expected to have...

What is wrong?

#1184797

I assume we are talking about the URL in your website:
lien caché

I have checked it in your website, here are what I found
1) You are using a post view in above page
lien caché
it is querying "Profili" posts
in the view's loop there is a content template

2) and you are using Divi builder to design the content template:
lien caché
I have tried to add post title shortcode in it: {!{wpv-post-title}!}

in front-end:
lien caché
it display the current page title "Crea Profilo" instead of "Profili" post's title
So the problem is abnormal.

Please try these:
1) Make sure you are using the latest version of Toolset plugins + Divi theme(plugins)
2) In case it is a compatibility problem, please deactivate other plugins, and switch to original Divi theme , and test again
3) If the problem still persists, please provide a copy of your website in below private message box, I need to test and debug it in my localhost.
https://toolset.com/faq/provide-supporters-copy-site/

#1185075
02-crea-profilo-page.png
01-my-profile-post.png

Hi Luo,
about more fields in lien caché I have added this code, id="{!{wpv-post-id}!}", into every toolset shortcode and it work fine.

But I have some issue with other my custom shortcode that I don't know how should I do display the correct content.

See the images to see the issues beetwen the My Profile CPT post and Crea Profilo page.

#1185703

You are using Divi builder to design the content template:
lien caché

See above URL, I have added a row (Testo module) in the bottom: with below shortcodes:

{!{wpv-post-link}!} | {!{wpv-post-id}!}

It is displaying these in front-end:
Crea Profilo | 9719

You can see it here:
lien caché

The result is current page information, but it should be able to output the current "Profili" post's in formation,

To verify the problem, you can put the same shortcode into View's loop here:
lien caché
section "Editor del ciclo", just before content template shortcode:
[wpv-post-body view_template="modello-di-contenuto-per-mio-profilo"]

Test it in front-end again:
lien caché

it outputs below "Profili" post's informations, for example:
assistenza | 9719

There are some problem in the Divi builder, which has changed the post information to current page, see my above answer:
https://toolset.com/forums/topic/split-i-need-to-insert-the-form-edit-link-to-menu-registration-form-and-view/#post-1184797

#1186027

My issue is resolved now. Thank you!