• Resolved allartsoftworks

    (@allartsoftworks)


    Hi, I have a strange and bad issue on my website. I developed and tested my custom “marketplace” with Peepso/WPAdverts on staging website and all went well.

    I did a lot of customization via template overwriting but in staging environment all works well.

    As I decided to move on production everything it suddenly broke its functionality: when I try to add some pics to the post it sends me to the preview and I can’t see the pictures then If I submit the advert It says “succesful submission” but it won’t submit nothing and the advert link points to “Add” page.

    I tried the jQuery hack using the in-bundle version, nothing changed.

    The only difference from staging to production environment is that I haven’t got the caching plugins on. BTW I’ve tried to enable them, too, without luck.

    I compared the two environments and all is IDENTICAL: plugins, settings, everything. The only difference could be in caching/minifying but I disabled everything to spot the issue on production and I solved nothing.

    I just noticed that disabling template overwriting in Peepso Wpadverts options enables me to post the advert but it broke the layout, prevents me to hack the form (I need to insert a policy textarea) and overlaps the prices section making it unusable (radio box aren’t selectable).

    Steps to reproduce:

    1) I create a new Advert via Menu > Marketplace > Add
    2) I compile the form and upload the images (the console shows some errors)
    3) I check the policy and click the preview button
    4) In the preview, no pics are shown or it says “ID error”
    5) If I submit the post, it says “successful submission” but it links to “Add” page and the post is not submitted.
    6) Nothing appears under Menu > Marketplace > Manage

    Adverts are available only to subscribed users, I can provide a test account to the devs only.

    Thank you in advance

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter allartsoftworks

    (@allartsoftworks)

    Here you can see the issue on my production environment:

    https://youtu.be/IB2D7yPeMrc

    Thread Starter allartsoftworks

    (@allartsoftworks)

    And after the latest Gecko update today I’m not able to overwrite templates anymore… 

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    regarding the Gecko issues, you would need to contact PeepSo support as this is their theme.

    If i understand correctly then switching theme or disabling the PeepSo integration allows you posting the Ad without any issues?

    If that is the case then the problem might be with the custom templates, or more precisely the templates would need to be updated to work correctly with the WPAdverts 1.4.

    Please see the “Custom Templates” section here https://wpadverts.com/blog/wpadverts-1-4-0-release/ it explains which files require updating.

    Also, you mentioned that both environments are the same, so maybe the difference is in the database configuration and the data does not save in the database at all.

    You can try opening file wp-config.php add there line define("WP_DEBUG", true); try posting an Ad again and see if it will show any errors.

    Once you finish posting you can check in MySQL db (using phpMyAdmin for example) if the new Ad is in the wp_posts table at all and if the MySQL server generated any errors (you might need to ask your hosting tech support about it).

    Thread Starter allartsoftworks

    (@allartsoftworks)

    Hi, thank you for your reply.

    I already contacted Peepso and they are working on my staging and production website to fix the issue.

    Before updating Gecko I was able to overwrite templates without problems apart from the ones I already cited.

    I already used call_user_func( adverts_field_get_renderer($field), $field, $form ) in my [child theme dir]/wpadverts/add.php template, just to say.

    The main issues were that I couldn’t post the advert entry on the production website. Tried the jQuery hack you suggested in other threads, with no luck.

    But since I updated Gecko yesterday night I noticed now posting issues are gone: good, but it raised two new issues:

    1) the messy layout at the bottom of the “add” page that cannot let the user choose between payments packages

    2) the fact that I cannot overwrite my template (I need to put a policy textarea in the form). Peepso option “Disable template overwriting” is disabled.

    I once put my templates, as the documentation explained, in my public_html/wp-content/themes/peepso-theme-gecko-child/wpadverts but now they aren’t loaded and I do need to overwrite the default ones.

    Now about the errors.

    Well, in the console, both in staging or in production website it shows this error:

    Uncaught TypeError: Cannot read property ‘attach_id’ of null
    at WPADVERTS.File.Singular.<anonymous>

    but images are correctly submitted, now.

    WP_DEBUG set to true doesn’t show any errors submitting the post (in fact, the post now is submitted, using the new Gecko version and no layout overwriting) but I need to overwrite the layout in some way and to fix the overlapping divs at the bottom of the “add” page.

    No problems in db, since the advert cpt is posted.

    To summarize, I just need to overwrite templates now and fix the graphics, and I’m done.

    I can provide you credentials to see the problem, if you need.

    Thank you in advance for your help.

    • This reply was modified 4 years ago by allartsoftworks. Reason: grammar fix
    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    1. please note that aside of adding the files in public_html/wp-content/themes/peepso-theme-gecko-child/wpadverts you also need a code snippet that will tell WPAdverts to load the files from there, maybe the snippet was removed on the Gecko update?

    The snippet itself you can find here https://wpadverts.com/documentation/child-themes-and-templates/ in ‘Using ‘adverts_load_template’ filter.’ section.

    2. i cannot seem to find the [adverts_add] page on your website? Can you paste the link here, or if you want to keep it private send it via the contact form at https://wpadverts.com/contact/?

    Thread Starter allartsoftworks

    (@allartsoftworks)

    God, I solved it. I’ve been so stupid. 

    I placed two times the “class” attribute in the submit button. For some strange reason it broke everything. 

    Really hard to debug, but a simple diff showed the culprit. 

    Thank you really for your kind assistance. 

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem uploading images’ is closed to new replies.