• Resolved AWOL

    (@awol)


    Just to clarify the post title, I updated to the latest version today, but it was from the 2.2.4 version, and after updating everything seemed OK except when I got to the Listing Form page; it seems fine on the front end, but when I went to edit it, I got the WordPress critical error message, but nothing in the error log. No other pages were affected. I have altered several files, but these are in the child theme folder, plus I have several filters and functions in the theme functions, but I changed the name of the folder (to hold-classified-listing) and commented out the functions, but the error was still occurring. I have altered one core file in the plugin (app -> Helpers ->Functions.php) to get something to work with myCred, but I also commented out that and the error still occurred. I have now rolled back to the version I had previously and the re is no problem, so something that was changed between that version and the latest version is obviously causing some conflict that wasn’t present before. I will probably try to work through the versions to see where the issue begins, but I wanted to raise it before I do that in case someone else has also encountered this, or if one of your guys might know what is causing it. It would be quite a time consuming task as there have been multiple updates though (13 in about 4 months), but I was busy on other projects before and many of the previous updates have looked quite minor. It seems strange to me that it is only affecting one page though. I hope you can help me avoid having to trawl through the previous updates!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Ali Akbar Reyad

    (@alireyad)

    It’s too difficult to find out the issue without face it. Could you give me the screenshot of issue? Did you enable debug log to check error?
    If you modify core files, how do you update plugin with modified code?
    Please, don’t modify core files, do the task from theme.

    Thread Starter AWOL

    (@awol)

    Hi, @alireyad thanks for your response. The screenshot is a bit pointless as it is just the standard white screen with the WordPress ‘There has been a critical error etc’ message, but without anything in the error log. And only when I try and edit the Listing Form page. What debug log are you referring to – there isn’t one in the plugin is there? Is it possible for me to set up an admin account for you, so you can log in and see it for yourself? I have rolled back to 2.2.4 at the moment.

    As regards when I update, I first download the latest version to my computer, and then compare the file (in this case app -> Helpers -> Functions.php) to the last unedited version I have installed (in this case 2.2.4 version), to see if any of the changes would impact the edit I made; if they don’t I go ahead and update the plugin, and then upload the new version of the file with my edit included via File manager in cPanel. I do this with any of the edited templates as well even though they are in my child theme folder.

    I know editing core files is frowned upon, but in this case I had no choice, as I couldn’t find any way to make the change I needed to without doing so. And as I have already said in my OP, I commented out the changes and this error still occurred. In fact I only added something, rather than editing anything else, so that I could pull data entered elsewhere to insert into a CL listing custom field as it was being created; it is too complicated to explain everything here, but I did start a topic about what I wanted to do at the time, to see if there was any other way of achieving what I wanted, and the answer from one of your guys I think, was no. So I found a way. Here is the topic – https://wordpress.org/support/topic/possible-to-fill-custom-field-automatically/

    I would paste the added code here, but as it ties into another plugin (myCred) and custom functions and a database query then there isn’t much point, especially as I don’t think it is what is causing the error, because it happens with the unedited file as well.

    Let me know how (or if) you can proceed with this. I will slowly try upgrading to all the previous versions before the current one, but as it works currently that is on the back burner as I am very busy with another project.

    Plugin Support Ali Akbar Reyad

    (@alireyad)

    I checked listing-form, don’t see any error. May be, something happened missing to update file manually. Better way, separate your code from core file and update plugin as usual then add your code later.

    After update plugin, first check error exist or not after update plugin. If exist then check from theme.

    You can enable debug log from wp-config.php file in wordpress root folder https://wordpress.org/support/article/debugging-in-wordpress/

    define( ‘WP_DEBUG’, true );
    define( ‘WP_DEBUG_LOG’, true );

    Thank You

    Thread Starter AWOL

    (@awol)

    Hi @alireyad ,
    OK, I have now completely reworked the code I had that required me to edit that core file, and now it does not touch the core plugin at all; all there is now is stuff in my theme functions, and edits to CL templates that are in a separate folder (as before) in my theme folder. So I went ahead and upgraded again to the current version. My edited template file folder was not active, so just your plugin as coded by you. Still the same error. I have now done the Debug, and a long page was produced with the following errors at the top:
    `Fatal error: Uncaught Error: Call to a member function set() on null in …/wp-content/plugins/classified-listing/app/Helpers/Functions.php on line 2994
    ( ! ) Error: Call to a member function set() on null in …/wp-content/plugins/classified-listing/app/Helpers/Functions.php on line 2994`
    And the last line of the log that presumably might also help is:
    20 1.4440 28084824 Rtcl\Helpers\Functions::clear_notices( ) .../ListingForm.php:20
    To save you looking, line 2994 is:

    		rtcl()->session->set( 'rtcl_notices', null );
    

    I am unable to send you the full Debug log as there is no way to attach anything to this message, but if you need it please tell me how to get it to you. As I mentioned in my original message, this error only seems to be affecting my ability to edit that one page, but obviously I have not yet been through the whole site to check. Please let me know what I can do to fix this error.

    Plugin Support Ali Akbar Reyad

    (@alireyad)

    Okay. We are checking issue. Hope will get it in next update.

    Thank You

    Plugin Support Ali Akbar Reyad

    (@alireyad)

    Please, update plugin to latest version 2.2.18 and check the issue.

    Thank You

    Thread Starter AWOL

    (@awol)

    Hi @alireyad,
    Thank you, that seems to have fixed the issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can’t edit Listing Form page after updating’ is closed to new replies.