New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with Jetpack's Photon: Featured Image removed when editing listing from frontend #576

Open
jeherve opened this Issue Nov 30, 2015 · 39 comments

Comments

Projects
None yet
@jeherve
Member

jeherve commented Nov 30, 2015

Steps to reproduce:

  1. Install Jetpack, activate Photon, install WPJM.
  2. Create a few listings from wp-admin, including both a Featured Image and some gallery images.
  3. Create a listings child page, and add [job_dashboard] to that page.
  4. Access that page, and click on edit to modify one of the listings from the frontend. The listing description as well as the featured image and the gallery images are all displayed there.
  5. Add a few words to the description, and save your changes.
  6. The Featured Image still appears as the "cover image" on the listing's page.
  7. Open the listing in wp-admin.
    • The Featured Image is gone.

This only happens when the Photon module is active.

Could it be because the image displayed on the frontend is different from the actual featured image (it is served from a WordPress.com subdomain, i{0-2}.wp.com), so when the form is submitted when saving your changes in the frontend editor, the media URL doesn't match a possible attachment on the site?

Reported in 2435021-t

@aheckler

This comment has been minimized.

Show comment
Hide comment
@aheckler

aheckler Jan 27, 2016

Member

I haven't tried to repro this or anything, but would be curious to hear @mikejolley's thoughts.

My initial reaction is to wontfix, because job listings should never be submitted via wp-admin. When our users say that they've done so and it messes up something with the job, we emphasize that everything should be done via the front-end.

With front-end submission, WPJM does not set featured images on job listings, nor can you add images to the job description:

screen shot 2016-01-27 at 9 24 05 am

So yeah, seems pretty edge-casey to me. Open to hearing other opinions though! 😄

Member

aheckler commented Jan 27, 2016

I haven't tried to repro this or anything, but would be curious to hear @mikejolley's thoughts.

My initial reaction is to wontfix, because job listings should never be submitted via wp-admin. When our users say that they've done so and it messes up something with the job, we emphasize that everything should be done via the front-end.

With front-end submission, WPJM does not set featured images on job listings, nor can you add images to the job description:

screen shot 2016-01-27 at 9 24 05 am

So yeah, seems pretty edge-casey to me. Open to hearing other opinions though! 😄

@jeherve

This comment has been minimized.

Show comment
Hide comment
@jeherve

jeherve Jan 27, 2016

Member

To be clear, the problem happens when editing listing on the frontend. Step 7 above is just an easy way to spot the error by looking at the Featured Image field in wp-admin.

Member

jeherve commented Jan 27, 2016

To be clear, the problem happens when editing listing on the frontend. Step 7 above is just an easy way to spot the error by looking at the Featured Image field in wp-admin.

@aheckler

This comment has been minimized.

Show comment
Hide comment
@aheckler

aheckler Jan 27, 2016

Member

Not sure what you mean... In Step 2, you said:

Create a few listings from wp-admin, including both a Featured Image and some gallery images.

... all three of which should never happen if people are using the plugin correctly.

Member

aheckler commented Jan 27, 2016

Not sure what you mean... In Step 2, you said:

Create a few listings from wp-admin, including both a Featured Image and some gallery images.

... all three of which should never happen if people are using the plugin correctly.

@jeherve

This comment has been minimized.

Show comment
Hide comment
@jeherve

jeherve Jan 27, 2016

Member

oh.hm. My bad. It's been a while since I created that ticket. Nevermind my last comment.

Member

jeherve commented Jan 27, 2016

oh.hm. My bad. It's been a while since I created that ticket. Nevermind my last comment.

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell

spencerfinnell Jan 27, 2016

Collaborator

I'm not sure submitting a job via the backend should be considered an edge case. The first feature on the site:

Add, manage and categorise job listings using the familiar WordPress UI.

Collaborator

spencerfinnell commented Jan 27, 2016

I'm not sure submitting a job via the backend should be considered an edge case. The first feature on the site:

Add, manage and categorise job listings using the familiar WordPress UI.

@mikejolley

This comment has been minimized.

Show comment
Hide comment
@mikejolley

mikejolley Jan 27, 2016

Contributor

WPJM doesn't use featured images itself, but does set them for some theme's benefit. It also tries to match an image URL to an attachment ID which is likely where this is falling down due to the replacement by Photon.

ideally we'd store non-CDN URLs, but it may not be possible to prevent the CDN changing URLs.

Contributor

mikejolley commented Jan 27, 2016

WPJM doesn't use featured images itself, but does set them for some theme's benefit. It also tries to match an image URL to an attachment ID which is likely where this is falling down due to the replacement by Photon.

ideally we'd store non-CDN URLs, but it may not be possible to prevent the CDN changing URLs.

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell

spencerfinnell Mar 7, 2016

Collaborator

@mikejolley This issue would still exist on normal file upload fields added to the submission form though wouldn't it?

Collaborator

spencerfinnell commented Mar 7, 2016

@mikejolley This issue would still exist on normal file upload fields added to the submission form though wouldn't it?

@mikejolley

This comment has been minimized.

Show comment
Hide comment
@mikejolley

mikejolley Mar 7, 2016

Contributor

@spencerfinnell most likely but not a lot you can do if the CDN plugin changes the URL returned by WP uploader..

Contributor

mikejolley commented Mar 7, 2016

@spencerfinnell most likely but not a lot you can do if the CDN plugin changes the URL returned by WP uploader..

@Rappadappa77

This comment has been minimized.

Show comment
Hide comment
@Rappadappa77

Rappadappa77 Jul 6, 2016

Hey Guys,

I haven't been following your post since last year, but I'm the individual who told @jeherve to look into the issue, hence why he created the post, JetPack has been updated for the last couple of months including today and I still have the same issue, I'm wondering if I'm the only person in the World who has this problem. So thank you to @mikejolley @spencerfinnell @aheckler for looking into this for me and trying to solve the problem.

Howard

Rappadappa77 commented Jul 6, 2016

Hey Guys,

I haven't been following your post since last year, but I'm the individual who told @jeherve to look into the issue, hence why he created the post, JetPack has been updated for the last couple of months including today and I still have the same issue, I'm wondering if I'm the only person in the World who has this problem. So thank you to @mikejolley @spencerfinnell @aheckler for looking into this for me and trying to solve the problem.

Howard

@jeherve

This comment has been minimized.

Show comment
Hide comment
@jeherve

jeherve Jul 13, 2016

Member

@Rappadappa77 Are you running the latest version of the WP Job Manager plugin, and still experiencing issues?

Member

jeherve commented Jul 13, 2016

@Rappadappa77 Are you running the latest version of the WP Job Manager plugin, and still experiencing issues?

@Rappadappa77

This comment has been minimized.

Show comment
Hide comment
@Rappadappa77

Rappadappa77 Jul 13, 2016

@jeherve Yes I'm running WP Job Manager 1.25.0 which was updated 3 months ago and yes the problem is still there.

Howard

Rappadappa77 commented Jul 13, 2016

@jeherve Yes I'm running WP Job Manager 1.25.0 which was updated 3 months ago and yes the problem is still there.

Howard

@jeherve jeherve reopened this Jul 13, 2016

@jeherve

This comment has been minimized.

Show comment
Hide comment
@jeherve

jeherve Jul 13, 2016

Member

Thanks. I reopened the issue, so we can take another look.

Member

jeherve commented Jul 13, 2016

Thanks. I reopened the issue, so we can take another look.

@Rappadappa77

This comment has been minimized.

Show comment
Hide comment
@Rappadappa77

Rappadappa77 Jul 13, 2016

Thank you man, much appreciated.

Rappadappa77 commented Jul 13, 2016

Thank you man, much appreciated.

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell

spencerfinnell Jul 13, 2016

Collaborator

Have had multiple reports of disabling Photon fixing the issue. Definitely still an issue on non-featured image fields.

Collaborator

spencerfinnell commented Jul 13, 2016

Have had multiple reports of disabling Photon fixing the issue. Definitely still an issue on non-featured image fields.

@Rappadappa77

This comment has been minimized.

Show comment
Hide comment
@Rappadappa77

Rappadappa77 Jul 13, 2016

@spencerfinnell Yes that fix the issue, but don't think it would be a good idea, hopefully can find this pesky bug.

Rappadappa77 commented Jul 13, 2016

@spencerfinnell Yes that fix the issue, but don't think it would be a good idea, hopefully can find this pesky bug.

@chaselivingston chaselivingston added this to the 1.25.1 milestone Aug 5, 2016

@Rappadappa77

This comment has been minimized.

Show comment
Hide comment
@Rappadappa77

Rappadappa77 Oct 12, 2016

Hey Guys,

Hope you all are doing fine?
Still no solution for this issue, Astoundify did an update where they said they disabled Photon, i don't see it in the JetPack admin, but the issue still persist, so not sure what happened there :(

Howard

Rappadappa77 commented Oct 12, 2016

Hey Guys,

Hope you all are doing fine?
Still no solution for this issue, Astoundify did an update where they said they disabled Photon, i don't see it in the JetPack admin, but the issue still persist, so not sure what happened there :(

Howard

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell

spencerfinnell Oct 12, 2016

Collaborator

@Rappadappa77 Temporarily disable Listify, then disable the Photon module in Jetpack, then enable Listify again.

Listify only hides the module from appearing in the list so the current setting remains active.

Collaborator

spencerfinnell commented Oct 12, 2016

@Rappadappa77 Temporarily disable Listify, then disable the Photon module in Jetpack, then enable Listify again.

Listify only hides the module from appearing in the list so the current setting remains active.

@Rappadappa77

This comment has been minimized.

Show comment
Hide comment
@Rappadappa77

Rappadappa77 Oct 12, 2016

@spencerfinnell Thank you for the information, that worked perfectly 👍

Howard

Rappadappa77 commented Oct 12, 2016

@spencerfinnell Thank you for the information, that worked perfectly 👍

Howard

@Rappadappa77

This comment has been minimized.

Show comment
Hide comment
@Rappadappa77

Rappadappa77 Oct 13, 2016

I hope you guys really find a solution for this because i can really see the slowdown in my website 👎.

Howard

Rappadappa77 commented Oct 13, 2016

I hope you guys really find a solution for this because i can really see the slowdown in my website 👎.

Howard

@dbtlr dbtlr modified the milestones: 1.25.2, 1.25.3 Oct 18, 2016

@AleksIralda

This comment has been minimized.

Show comment
Hide comment
@AleksIralda

AleksIralda Dec 7, 2016

@Rappadappa77 Hey, you're not alone. I have same problem, I hope a solution for this.

AleksIralda commented Dec 7, 2016

@Rappadappa77 Hey, you're not alone. I have same problem, I hope a solution for this.

@kraftbj kraftbj modified the milestones: 1.25.3, 1.25.4 Mar 8, 2017

@bikedorkjon bikedorkjon added the ready label Apr 5, 2017

@jom

This comment has been minimized.

Show comment
Hide comment
@jom

jom May 16, 2017

Member

Just a note: I think this has been fixed for the Featured Images/Company Logo.

Member

jom commented May 16, 2017

Just a note: I think this has been fixed for the Featured Images/Company Logo.

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell

spencerfinnell May 16, 2017

Collaborator

Correct. It fails on the file upload field because the value is stored as a URL instead of an ID. The initial versions of WP Job Manager did not create actual attachments for uploaded files so this was more difficult to solve. However now I think some sort of backwards compatible storage method to convert values to IDs may be possible.

Collaborator

spencerfinnell commented May 16, 2017

Correct. It fails on the file upload field because the value is stored as a URL instead of an ID. The initial versions of WP Job Manager did not create actual attachments for uploaded files so this was more difficult to solve. However now I think some sort of backwards compatible storage method to convert values to IDs may be possible.

@davoraltman

This comment has been minimized.

Show comment
Hide comment
@davoraltman

davoraltman May 18, 2017

@jom I can't reproduce this issue either and it seems to be working properly now.

On the side note, I've noticed two things:

1 - I don't see where the Gallery Images is displayed. Am I missing something? Should it be displayed at [job_dashboard] page for a single listing?
2 - Since you can upload only one image there, we should name it Gallery Image

davoraltman commented May 18, 2017

@jom I can't reproduce this issue either and it seems to be working properly now.

On the side note, I've noticed two things:

1 - I don't see where the Gallery Images is displayed. Am I missing something? Should it be displayed at [job_dashboard] page for a single listing?
2 - Since you can upload only one image there, we should name it Gallery Image

@jom jom self-assigned this May 22, 2017

@spencerfinnell spencerfinnell removed this from the 1.26.0 milestone May 23, 2017

@bikedorkjon

This comment has been minimized.

Show comment
Hide comment
@bikedorkjon

bikedorkjon Jun 1, 2017

User reported issue in 3239255-t @jom what is left to do here to get this fixed?

bikedorkjon commented Jun 1, 2017

User reported issue in 3239255-t @jom what is left to do here to get this fixed?

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Jun 13, 2017

I believe this is still an issue. I am using WPJM together with Listify theme and Jetpack Photon. Image was originally uploaded with the front-end uploader, whenever someone edits the listing in the front-end (no matter what edit), file in screenshot is created.

screen shot 2017-06-13 at 16 41 15

linusfeldt commented Jun 13, 2017

I believe this is still an issue. I am using WPJM together with Listify theme and Jetpack Photon. Image was originally uploaded with the front-end uploader, whenever someone edits the listing in the front-end (no matter what edit), file in screenshot is created.

screen shot 2017-06-13 at 16 41 15

@aheckler

This comment has been minimized.

Show comment
Hide comment
@aheckler

aheckler Jun 13, 2017

Member

@linusfeldt That looks like this issue here: #603

Member

aheckler commented Jun 13, 2017

@linusfeldt That looks like this issue here: #603

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Jun 13, 2017

@aheckler Fair enough I am not that technical. I do believe the issue is quite similar to the one described above after all.

This is probably why the mismatch occur and a new file is created.

screen shot 2017-06-13 at 17 08 45

linusfeldt commented Jun 13, 2017

@aheckler Fair enough I am not that technical. I do believe the issue is quite similar to the one described above after all.

This is probably why the mismatch occur and a new file is created.

screen shot 2017-06-13 at 17 08 45

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell

spencerfinnell Jun 13, 2017

Collaborator

Might be as simple as just telling Photon to not do anything on the submit/edit pages: https://jetpack.com/2013/05/03/skip-a-image-with-photon/

Collaborator

spencerfinnell commented Jun 13, 2017

Might be as simple as just telling Photon to not do anything on the submit/edit pages: https://jetpack.com/2013/05/03/skip-a-image-with-photon/

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Jun 13, 2017

@spencerfinnell sounds like a plan. I can test it right away. Just need find a way to identify the ID of that specific page(s).

linusfeldt commented Jun 13, 2017

@spencerfinnell sounds like a plan. I can test it right away. Just need find a way to identify the ID of that specific page(s).

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell

spencerfinnell Jun 13, 2017

Collaborator

You can use if ( is_page( get_option( 'job_manager_submit_job_form_page_id' ) ) ) {}

Collaborator

spencerfinnell commented Jun 13, 2017

You can use if ( is_page( get_option( 'job_manager_submit_job_form_page_id' ) ) ) {}

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Jun 13, 2017

@spencerfinnell Something like this? I am afraid it got too technical for me...

function no_photon_by_page() {
if ( is_page( get_option( 'job_manager_submit_job_form_page_id' ) ) ) {}
add_filter( 'jetpack_photon_skip_image', '__return_true');
}
}

add_action('wp', 'no_photon_by_page');

linusfeldt commented Jun 13, 2017

@spencerfinnell Something like this? I am afraid it got too technical for me...

function no_photon_by_page() {
if ( is_page( get_option( 'job_manager_submit_job_form_page_id' ) ) ) {}
add_filter( 'jetpack_photon_skip_image', '__return_true');
}
}

add_action('wp', 'no_photon_by_page');

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell
Collaborator

spencerfinnell commented Jun 13, 2017

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Jun 13, 2017

@spencerfinnell Thanks!

Although it is still not working. As soon as I upload an image, click save. And when I open the edit page again the image is served from Photon. When I click save a trash file is created in the media library.

linusfeldt commented Jun 13, 2017

@spencerfinnell Thanks!

Although it is still not working. As soon as I upload an image, click save. And when I open the edit page again the image is served from Photon. When I click save a trash file is created in the media library.

@spencerfinnell

This comment has been minimized.

Show comment
Hide comment
@spencerfinnell

spencerfinnell Jun 13, 2017

Collaborator

Make sure your submission page is set in Job Listings > Settings > Pages. Will test on my end too.

Collaborator

spencerfinnell commented Jun 13, 2017

Make sure your submission page is set in Job Listings > Settings > Pages. Will test on my end too.

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Jun 13, 2017

No luck. I even tried to insert the ID of the page where I have the [submit_job_form] shortcode, with the same result.

linusfeldt commented Jun 13, 2017

No luck. I even tried to insert the ID of the page where I have the [submit_job_form] shortcode, with the same result.

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Jun 14, 2017

Alright, I got some more clues:

I got the "Company Logo" to load without Photon using a variation of the code above. However the "Cover Image" / Featured Image is still loaded from Photon. I believe it's due to the fact that Featured Images - specifically the downsizing of Featured Images- are handled different, and is producing this issue.

("Photon currently only acts on images in posts and pages, as well as featured images/post thumbnails via the image_downsize filter.")

I found a post talking about it here: https://ethitter.com/2013/07/disable-jetpacks-photon-module-in-specific-situations/

The code does not work inside my functions.php and this is where I get stuck.

linusfeldt commented Jun 14, 2017

Alright, I got some more clues:

I got the "Company Logo" to load without Photon using a variation of the code above. However the "Cover Image" / Featured Image is still loaded from Photon. I believe it's due to the fact that Featured Images - specifically the downsizing of Featured Images- are handled different, and is producing this issue.

("Photon currently only acts on images in posts and pages, as well as featured images/post thumbnails via the image_downsize filter.")

I found a post talking about it here: https://ethitter.com/2013/07/disable-jetpacks-photon-module-in-specific-situations/

The code does not work inside my functions.php and this is where I get stuck.

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Jul 19, 2017

@spencerfinnell Did you get chance to take a look at this?

linusfeldt commented Jul 19, 2017

@spencerfinnell Did you get chance to take a look at this?

@annezazu

This comment has been minimized.

Show comment
Hide comment
@annezazu

annezazu Sep 6, 2017

@spencerfinnell noting that a user tried what you suggested in 669730-zen and the fix did not work.

annezazu commented Sep 6, 2017

@spencerfinnell noting that a user tried what you suggested in 669730-zen and the fix did not work.

@linusfeldt

This comment has been minimized.

Show comment
Hide comment
@linusfeldt

linusfeldt Dec 19, 2017

[Edit] This is still an issue
screen shot 2018-01-06 at 14 11 36

linusfeldt commented Dec 19, 2017

[Edit] This is still an issue
screen shot 2018-01-06 at 14 11 36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment