lumturo-net / contao-personio-bundle

Contao Personio CTE
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Where to input Company? #1

Open hangarsieben opened 3 years ago

hangarsieben commented 3 years ago

Hi there, I just wanted to test out your Personio Bundle - but I keep running into he problem that the „Firma“-field in the „Personio Stellenanzeigen & Details“ content element is empty... Could you please point me in the right direction where to set up the company? Webservice-URL is correct I think (https://MYACCOUNT.jobs.personio.de/xml)...

gmpf commented 2 years ago

I'm not the creator of this bundle, but I'm currently evaluating it for use as well. If your issue is still relevant, can you post an anonymised version of the XML you're getting when you open the web service URL directly? Also, what do you see in the front-end? Even without anything selected for the "Firma" field, you should be getting some sort of output. What is it?

Some pointers:

  1. The "Firma" field is not a mandatory field for your company name. You only need it if you have more than one sub-company providing jobs under that XML feed. In that case, there is expected to be a <subcompany/> node under each <position/> node. Is this even relevant in your case? If so, do you have a sub-company assigned to the position in Personio? This article includes the information where to assign the sub-company to a position.

  2. There is a bug in the bundle that leads to garbage being displayed if there is only one position in the XML feed. I'm going to submit a fix for that.

  3. Whatever is returned on first call is cached for one day. The bundle uses Symfony's FilesystemAdapter directly and doesn't provide the application cache directory to it. That means the result is cached in whatever sys_get_temp_dir() returns instead of var/cache/<env>. Therefore, you cannot clear the cached result by clearing the application cache (i. e. vendor/bin/contao-console cache:clear and even rm -rf var/cache don't help). Basically, while you're still testing your setup, I strongly suggest the following:

    1. Edit vendor/lumturo-net/contao-personio-bundle/src/Traits/Reader.php and comment out the cache-related lines here: https://github.com/lumturo-net/contao-personio-bundle/blob/e4d9605b5180775240bd6ef5a56b848b67f73974/src/Traits/Reader.php#L22-L23 https://github.com/lumturo-net/contao-personio-bundle/blob/e4d9605b5180775240bd6ef5a56b848b67f73974/src/Traits/Reader.php#L29

    2. As you probably already have something cached, have a look what directory sys_get_temp_dir() returns in your case. Then, in that directory, look for the symfony-cache sub-directory and remove the cache file that contains the cached Personio stuff (maybe it's just "NULL" or something). In my case, there was only one file in a cascade of directories, so finding it wasn't hard. If you are not testing anything related to caching in Symfony at the same time, just remove everything inside symfony-cache.

hangarsieben commented 2 years ago

Hi @gmpf, thank you so much for your reply! In fact I fell victim to your #2 – there was only one published position in the feed and there was only garbage displayed! I figured this had to be connected to the „Firma“ field not being filled correctly. I published more vacancies and everything seems to be ok now! I myself am working on a solution for submitting applications back to the Personio API via a Contao form...

gmpf commented 2 years ago

Glad to be of help. :)

I myself am working on a solution for submitting applications back to the Personio API via a Contao form...

I've been commissioned to work on that as well. In my case, I'll probably be adding to this bundle. Maybe we can get in touch to avoid duplicate work: alex@das-l.de