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

[Confluence] Bug - Page ID is ignored when Space is provided #3133

Open
ddnimara opened this issue Nov 14, 2024 · 0 comments
Open

[Confluence] Bug - Page ID is ignored when Space is provided #3133

ddnimara opened this issue Nov 14, 2024 · 0 comments

Comments

@ddnimara
Copy link

ddnimara commented Nov 14, 2024

Bug Summary

Current logic in confluence/connector.py makes it so page_id is not considered when space is provided, effectively indexing the entire space.

The code in question is here.

The logic in place

        elif space:
            # if no cql_query is provided, we will use the space to fetch the pages
            cql_page_query += f" and space='{quote(space)}'"
        elif page_id:
            if index_recursively:
                cql_page_query += f" and ancestor='{page_id}'"
            else:
                # if neither a space nor a cql_query is provided, we will use the page_id to fetch the page
                cql_page_query += f" and id='{page_id}'"

Potential fix

Considering this point, we should swap the elifs so that space is ignored if a specific page_id is provided.

This would also ensure that the current code state reflects what is present in the documentation which states:

Page ID (optional): Specific page ID to index - leave empty to index the entire space (e.g., 131368 for a specific page)

implying that in order to index the entire space, you should leave the page_id field empty (which conversely implies that if you do not leave it empty, it will not parse the entire space).

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

No branches or pull requests

1 participant