Skip to content
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

Cannot export OPML #1438

Closed
noiret opened this issue Jun 14, 2023 · 4 comments
Closed

Cannot export OPML #1438

noiret opened this issue Jun 14, 2023 · 4 comments
Labels
Milestone

Comments

@noiret
Copy link

noiret commented Jun 14, 2023

Hello,

When i try to export my RSS feed on the web U.I the request failed and i have this following error in log :
[proxy_fcgi:error] [pid 243725] [client 12.34.56.78:59634] AH01071: Got error 'PHP message: Undefined array key "Youtube"PHP message: [selfoss/src/controllers/Opml/Export.php:150] Base->{closure}()PHP message: [selfoss/index.php:155] controllers\\Opml\\Export->export()PHP message: [selfoss/vendor/bramus/router/src/Bramus/Router/Router.php:440] Bramus\\Router\\Router->invoke()PHP message: [selfoss/vendor/bramus/router/src/Bramus/Router/Router.php:287] Bramus\\Router\\Router->handle()PHP message: [selfoss/index.php:170] Bramus\\Router\\Router->run()'

Selfoss : 2.19
PHP (FPM): 8.1.2
Database : mysql Ver 15.1 Distrib 10.3.38-MariaDB

@jtojnar jtojnar added the bug label Jun 14, 2023
@jtojnar jtojnar added this to the 2.20 milestone Jun 14, 2023
@jtojnar
Copy link
Member

jtojnar commented Jun 14, 2023

Thanks for reporting, this sounds like Youtube tag does not have a colour associated.
Possibly because we forgot to normalize it to lowercase somewhere when saving it.
Looking into it.

https://github.com/fossar/selfoss/blob/2.19/src/controllers/Opml/Export.php#L150

@jtojnar
Copy link
Member

jtojnar commented Jun 14, 2023

Looks like MySQL now treats tags as case insensitive. It has originally been fixed by #625 but looks like it regressed in 5af5737.

@jtojnar jtojnar changed the title [BUG] Cannot export OPML Cannot export OPML Jun 15, 2023
@jtojnar
Copy link
Member

jtojnar commented Jun 15, 2023

In #1439, I have fixed what I think is the issue and new development build with the fix should be available shortly.

If you do not want to update yet, you can apply the following patch, which will omit the selfoss-specific color metadata when not available:

--- a/src/controllers/Opml/Export.php
+++ b/src/controllers/Opml/Export.php
@@ -147,6 +147,7 @@ class Export {
             $this->writer->writeAttribute('title', $tag);
             $this->writer->writeAttribute('text', $tag);
 
+            if (isset($tagColors[$tag]))
             $this->writer->writeAttributeNS('selfoss', 'color', null, $tagColors[$tag]);
 
             foreach ($children as $source) {

@noiret
Copy link
Author

noiret commented Jun 16, 2023

Hello,

I confirm that the patch works \0/
Thank you for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants