Skip Navigation

[Resolved] You attempted to edit a View that doesn’t exist. Perhaps it was deleted?

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that all the user's view vanished and he is unable to create a new one.

Solution:

In this user's case the issue was being caused by a custom code that they wrote. What I recommend that you do is to temporarily disable all the non-toolset plugins and remove any custom coding from your site and check the issue if its still there.

This support ticket is created 5 years, 3 months ago. 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 13 replies, has 2 voices.

Last updated by Shane 5 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1186810

I am trying to:

Create a view and getting this error message. You attempted to edit a View that doesn’t exist. Perhaps it was deleted?

Strangely I'm not sure did I delete views or did they disappear. I'm sure I had some other Views.

Link to a page where the issue can be seen:

Toolset -> Views - Add new view

I expected to see:

To be able to add a view

Instead, I got:

Error You attempted to edit a View that doesn’t exist. Perhaps it was deleted?

#1186824

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephen,

Thank you for contacting our support forum.

Thanks for the duplicator package. Currently checking to see if the issue is replicable on it.

#1186825

Hi there - actually I might need to update the duplicator package

You can check the live site I can provide login details for it and I have a backup of the live site also

Let me know if you need the duplicator package updated. I have two support requests open with yourself currently and thought it might be easier if you just work on the live site? It's under construction and has no traffic so I don't mind what happens. It's not working yet anyway.

#1186827

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephen,

I was able to check the issue on the live site.

I can say the issue isn't there locally when i restored the copy.

Checking on the live site again.

#1186830

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2019-01-18 at 10.08.03 AM.png

Are the views that are on the duplicator the ones that you want ? See Screenshot

#1186835

I'm pretty sure that views have some how been deleted or gone missing and they're still there some how and that's causing the error.

I say this because I setup a view called "show-installer-mail" to get an email from a custom field and then use that to create a generic_cred_field and I can see it's still there somehow because the emails are showing below the form

hidden link

That's the form hidden link

But the view is gone - only one view (the latest one I made) is there.

#1186836

Hi there, the duplicator package is not brand new, I'll make a brand new duplicator package and reupload it to that google drive folder - I'll reply once the new duplicator package is uploaded

#1186838

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephen,

Thanks, looking forward to the new duplicator.

Also can you remember when was this issue first noticed and what happened before?

Thanks,
Shane

#1186846

Hi there - brand new duplicator package currently in the google drive

hidden link

#1186848

Hi there

First noticed today and yesterday I remember like your screenshot there being multiple 'Views' that I had created and everything was working as expected. Only today a few hours ago I noticed this error message.

#1186944

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephen,

The issue is actually being caused by this code here.

add_filter( 'wpv_view_settings', 'prefix_modify_rendered_view', 30, 2 );
function prefix_modify_rendered_view( $view_settings, $view_id ) {
    if ( $view_id == 572 ) { // if displaying a View with ID equal to 572
        if ($_GET['toolset_maps_distance_center'] != '') {
            $query_center = $_GET['toolset_maps_distance_center'];
            $view_settings['distance_order'] = array(
                "source" => "fixed",
                "center" => $query_center
            );
        }
    return $view_settings;
}
}
#1186945

Okay that makes sense. I added that around the time that the error happened and forgot I had added it.

Actually I got that code off this forum because I was hoping to order the results of the distance related custom search view so the matching posts shown are ordered in order of distance from the users search location. For example, the user searches for solar panel installers near them and the distance is anything within say 150km. I'd prefer the closest ones to turn up. That's what that code is supposed to do. I guess I can disable that code for now and start a new support ticket when the time is closer to make this issue a priority. I'd like to get the other ticket I have currently open about the styling of the search field sorted first.

Thanks for your help.

#1186946

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

I think you should set the code to run on the frontend only.

#1186947

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

resolved

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