rss-bridge icon indicating copy to clipboard operation
rss-bridge copied to clipboard

[PanneauPocketBridge] enhancements

Open floviolleau opened this issue 1 year ago • 11 comments

  • I noticed that ->innerText do not work while ->innerText() works
  • renamed a variable do understand better
  • add a parameter to getCities (function used for debugging)

floviolleau avatar Jul 28 '22 11:07 floviolleau

Pull request artifacts

file last change
PanneauPocketBridge-current-context1 2022-08-26, 10:25:17
PanneauPocketBridge-pr-context1 2022-08-26, 10:25:17

github-actions[bot] avatar Jul 28 '22 11:07 github-actions[bot]

Can you give an example of what this pr fixes? Your first bullet point.

dvikan avatar Jul 31 '22 03:07 dvikan

Hi @dvikan ,

On my side, if I use

$item['content'] = $itemDom->find('.sign-preview__content .content', 0)->innertext;

it doesn't work and if use this, it works:

$item['content'] = $itemDom->find('.sign-preview__content .content', 0)->innertext();

Can you please tell a bit more what do you expect from me?

floviolleau avatar Aug 01 '22 07:08 floviolleau

Which <select> option are you seeing this with?

dvikan avatar Aug 01 '22 08:08 dvikan

<select> options?

It's for the title and the content of the RSS item the innerText

Sorry, but I don't understand what you mean

floviolleau avatar Aug 01 '22 09:08 floviolleau

The bridge has a list Choisir une ville where you select an option. The reason I ask is because I don't see a difference with your pr. I was testing with the first option.

EDIT: ->innertext and ->innertext() are equivalent. Maybe you are seeing cached results. Try touch DEBUG.

dvikan avatar Aug 01 '22 09:08 dvikan

Ok understood.

Usually, when I play with a RSS feed, I set CACHE_TIMEOUT to 0.

On my side, all was empty when selecting the first option like you. No contents, no titles in the cards. I tried different cities and all was blank. When I changed to ->innerText() instead of ->innerText, all was filled in.

I develop every day with php and I didn't understood why causes that. I'm on a raspberry pi maybe this is the issue.

floviolleau avatar Aug 01 '22 09:08 floviolleau

The current bridge works fine for me. Notice that the property is case-sensitive and it must be ->innertext and NOT ->innerText.

The current bridge has:

$itemDom->find('.sign-preview__content .title', 0)->innertext

dvikan avatar Aug 01 '22 09:08 dvikan

yes right, I missed type on comments. In the PR it is ->innertext().

I will try again on my server

floviolleau avatar Aug 01 '22 11:08 floviolleau

@floviolleau progress?

Bockiii avatar Aug 24 '22 13:08 Bockiii

Hi,

~Checking now~

I checked and without braces, it works. I didn't understood what happened. I changed the PR accordingly

Thanks

floviolleau avatar Aug 26 '22 10:08 floviolleau