Skip Navigation

[Résolu] Cred Delete Post php link not working

This support ticket is created Il y a 8 années et 3 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Marqué : 

This topic contains 9 réponses, has 4 voix.

Last updated by yuri.s Il y a 8 années et 2 mois.

Assisted by: yuri.s.

Auteur
Publications
#353378

I am trying to use the cred php template code, everything seems to be working up until the "$message.

https://toolset.com/forums/topic/cred-php-parameters/

This doesn't appear to be fixed, despite the post saying it would be fixed in the next release. This is a very important part of my project, please let me know what to do

cred_delete_post_link($post->ID, '<i class="fa fa-times-circle dash-breadcrumbs-icon"></i><span class="dash-nav-text">Delete</span>', 'delete', 'cred-refresh-after-delete rl-cred-delete', 'display: block;', 'Do you really want to delete this Project? There is no undo.', 'Project Deleted.', 1, '/clients') 
									//cred_delete_post_link($post_id = false, $text = '', $action = '', $class = '', $style = '', $message = '', $message_after = '', $message_show = 1, $redirect = '') 
#353611

shekhar
Supporter

Hi there,

Thank you for contacting Toolset support.

I’ll escalate this ticket to our next level support. Please be patient, wait for a reply from them and they will get in touch with you as soon as possible.

In the meantime, could you please send the debug information to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

Thanks

#353759

Hi, thanks I think this is a bug with the actual shortcode and not with my site - as documented in that last link.

I just don't think it was fixed, even tested on your support team's environment it didn't work. I'll wait for the reply from the dev, thanks a lot

#353913

Hello,

There is a bug indeed, I've forwarded the issue to our CRED development team. They will take care of this issue very soon. We will probably include a fix for this in the next release, no ETA yet.

Please let me know if you are satisfied with my reply and any other questions you may have.

Regards,

Adriano Ferreira

#356469

Thanks guys,

is it possible to provide a php workaround for this until the code is updated? I was really relying on cred for this

#357132

HI Josh, unfortunately we are still waiting for an update from our CRED developers.

As soon as we have an update from them I'll let you know.

Regards,
Yuri.

#357266

Hi Josh, I've just emailed to your registered forum email our latest CRED beta version since we don't have yet an estimate for the release of our next CRED version.

Let me know how it goes.

Regards,
Yuri.

#358345

Hi Yuri, I tried this but the redirect url still isn't working:

cred_delete_post_link(get_the_ID(), '<i class="fa fa-times-circle dash-breadcrumbs-icon"></i><span class="dash-nav-text">Delete</span>', 'delete', 'cred-refresh-after-delete rl-cred-delete', 'display: block;', 'Do you really want to delete this Project? There is no undo.', 'Project Deleted.', 1, '/client/')

There is now an alert asking whether the user wants to be directed to the homepage or not, instead of automatically redirecting to the url provided.

Can you see any errors in my code?

#360159

Hi Josh, there is no apparent error in your code.

I'm checking with our CRED developer what is going on with the redirect.

Regards,
Yuri.

#360185

Hi Josh, I've confirmed with our CRED developer and the php function does not accept an explicit redirect URL as the last parameter, only a boolean. You must change the "/client" from the end or your php call to "1" as this is a flag for redirecting or not. Then use a filter to force the redirect URL.

Here is a sample of this filter.

add_filter("cred_redirect_after_delete_action", "test");
function test($redurl, $post_id) {
    return "/client/";
}

Let me know how it goes.

Regards,
Yuri.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.